Creates a Task that upon execution will return the result of the
first completed task in the given list and then cancel the rest.
Returns a new task that, when executed, will emit the result of the given function executed asynchronously.
Create a Task from an asynchronous computation, which takes the
form of a function with which we can register a callback.
Create a Task from an asynchronous computation, which takes the
form of a function with which we can register a callback. This
can be used to translate from a callback-based API to a
straightforward monadic version.
is a function that will be called when this Task
is executed, receiving a callback as a parameter, a
callback that the user is supposed to call in order to
signal the desired outcome of this Task.
Promote a non-strict value representing a Task to a Task of the same type.
Returns a task that on execution is always finishing in error emitting the specified exception.
Promote a non-strict value to a Task, catching exceptions in the process.
Promote a non-strict value to a Task, catching exceptions in the process.
Note that since Task is not memoized, this will recompute the
value each time the Task is executed.
Creates a Task that upon execution will return the result of the
first completed task in the given list and then cancel the rest.
Creates a Task that upon execution will return the result of the
first completed task in the given list and then cancel the rest.
Alias for Task.amb.
Mirrors the given source Task, but upon execution it forks its
evaluation off into a separate (logical) thread.
Converts the given Scala Future into a Task.
Converts the given Scala Future into a Task.
NOTE: if you want to defer the creation of the future, use in combination with defer.
Given two tasks and a mapping function, returns a new Task that will be the result of the mapping function applied to their results.
Returns a Task that on execution is always successful, emitting
the given strict value.
Transforms a TraversableOnce[Task[A]] into a
Task[TraversableOnce[A]].
Transforms a TraversableOnce[Task[A]] into a
Task[TraversableOnce[A]]. Useful for reducing many Tasks
into a single Task.