We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc644dc commit d35fb08Copy full SHA for d35fb08
1 file changed
src/FSharpPlus/Extensions/Task.fs
@@ -285,9 +285,12 @@ module Task =
285
(fun () -> body disp)
286
(fun () -> if not (isNull (box disp)) then disp.Dispose ())
287
288
+ /// Creates a Task from a value
289
+ let ofValue value = Task.FromResult value
290
+
291
/// Raises an exception in the Task
292
let raise (e: exn) =
293
let tcs = TaskCompletionSource<'U> ()
294
tcs.SetException e
295
tcs.Task
-#endif
296
+#endif
0 commit comments