-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
feature requestNew feature or enhancement requestNew feature or enhancement requesttopic: task-exRelated to the proposed new TaskEx library, which should get its own oss havenRelated to the proposed new TaskEx library, which should get its own oss haven
Milestone
Description
Replaces #128. TaskEx top level issue: #139
Async.Ignore has always been ugly and undiscoverable. While I tend to make ignoring explicit by using let! _ = <async stuff I want to ignore result of>, it's commonly the last expression in a function, and having to do let! _ = <thing I'm wrapping> in () is too much.
It is proposed that the module associated with any given builder should by convention have an ignore function that correctly observes completion of the work, dropping the result, but propagating exceptions, if any
Current proposed APIs that are not currently in FSharp.Core (will be updated inline based on discussion below):
module Async =
let inline ignore (a : Async<'t>) = Async.Ignore
module Task =
let inline ignore (t : Task<'t>) = ...
module ValueTask =
let inline ignore (t : ValueTask<'t>) = ...
NOTES:
- Currently,
TaskSeq(and other libs such as IcedTasks contain various bespoke implementations - While this could live in a TaskEx lib, it could be argued that
FSharp.Coreis the obvious home for them. (However that would raise the issue of whether they need to go into the 6.x release line in order to align with minimal dependencies for various common libraries)
Metadata
Metadata
Assignees
Labels
feature requestNew feature or enhancement requestNew feature or enhancement requesttopic: task-exRelated to the proposed new TaskEx library, which should get its own oss havenRelated to the proposed new TaskEx library, which should get its own oss haven