gears.async.Async
See theAsync companion object
The async context: provides the capability to asynchronously await for Sources, and defines a scope for structured concurrency through a CompletionGroup.
As both a context and a capability, the idiomatic way of using Async is to be implicitly passed around functions, as an using
parameter:
def function()(using Async): T = ???
It is not recommended to store Async in a class field, since it complicates scoping rules.
Value parameters
- scheduler
-
An implementation of a scheduler, for scheduling computation as they are spawned or resumed. See Scheduler.
- support
-
An implementation of the underlying asynchronous operations (suspend and resume). See AsyncSupport.
Attributes
- See also
-
Async.blocking for a way to construct an Async instance.
Async.group and Future.apply for Async-subscoping operations.
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article