AsyncCompanion
Companion object of Async, but with a type parameter to allow fine grained type inference. This could potentially be simplified if we ever get named type parameters.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Main async syntax. The body expr is not executed until the returned Async is started with delay.extensions.run or one of the variants. Any exceptions raised in expr are forwarded to the handler of the async run.
Main async syntax. The body expr is not executed until the returned Async is started with delay.extensions.run or one of the variants. Any exceptions raised in expr are forwarded to the handler of the async run.
Attributes
While we don’t do bind inside of nested expressions, if the expression returns an async we can bind it. Sometimes, having this as a block is syntactically more convenient, i.e:
While we don’t do bind inside of nested expressions, if the expression returns an async we can bind it. Sometimes, having this as a block is syntactically more convenient, i.e:
Async:
bind:
if random > 4
then Async(...)
else Async(...)
Attributes
Use inside a fromCallback
.provide, but you can put the context first.
.provide, but you can put the context first.
Attributes
Simple form of resource handling given an open and close function for some resource. Makes the resource available inside the async body and ensures it is closed as soon as body is done (exceptionally or normally).
Simple form of resource handling given an open and close function for some resource. Makes the resource available inside the async body and ensures it is closed as soon as body is done (exceptionally or normally).
Attributes
Enables the use of Async.bind inside a sequential looking block.