Skip to content

Productize Task/ValueTask/Async.ignore #128

Description

@bartelink

I've long felt icky about using Async.Ignore. Seeing the Async.ignore that's presently hiding in plain sight here makes me realise the absence of a Task.ignore and ValueTask.ignore from FSharp.Core is something I've also been grinning and bearing (sprinkling :> Task and all sorts of other such mindless hacks). Utils.fs presently has helpers that feel very tempting to use more broadly. However, binding to a set of support helpers on the fringe of this library's core feature set is obviously debatable.

(The other pair from here that I feel deserves a canonical implementation in a library that doesn't include a jungle of other less-related helpers is Async.ofTask/Task.toAsync, but with corrected AggregateException semantics, and honoring of Async.Cancellation when compared to Async.AwaitTask as per FSharp.Core. Will likely calve off a separate issue from this if placeholder FSharp.Core.TaskShims package/repo is deemed to be the best home for a set of ignore helpers)

related:

Activity

  1. abelbraaksma commented on Dec 14, 2022

    @abelbraaksma
    Member

    /cc @dsyme, we should discuss this. Some of this effort may ultimately land back into F# Core, but agreeing on a TaskEx library (name tbd) and adding it to the FsProjects realm may be a good idea.

    This is related to #78, specifically #78 (comment).

  2. TheAngryByrd commented on Dec 15, 2022

    @TheAngryByrd
    Collaborator

    Yeah I have a lot of the same functions floating around in IcedTasks (example1, example2) and FsToolkit (example1, example2)

    I even have a tool that writes out all the functions (like map, bind, apply, zip, etc) and which libraries contain them because it's hard to know who implementing what these days and where the gaps are in functionality.

  3. bartelink commented on Jan 5, 2023

    @bartelink
    MemberAuthor

    Closing in favor of #139 (general high level discussion about shimming and/or libraries/projects) and #140 (ignore helpers only)

  4. bartelink commented on Jan 5, 2023

    @bartelink
    MemberAuthor

    Switching close reason; work is not completed; sorry!

  5. abelbraaksma commented on Jan 7, 2023

    @abelbraaksma
    Member

    Thanks for writing out these covering issues! Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions