Module: Ruff::Standard::Async
- Defined in:
- lib/ruff/standard/async.rb
Overview
Async
provides effects Async.async
, Async.yield
and Async.await
,
and the implementation async/await.
This implementation is based on the tutorial for Multicore OCaml.
The module has an instance of Instance
and provides its methods as module method.
Defined Under Namespace
Classes: Instance
Instance Attribute Summary collapse
- #eff ⇒ Object readonly
Class Method Summary collapse
Instance Attribute Details
#eff ⇒ Object (readonly)
181 182 183 |
# File 'lib/ruff/standard/async.rb', line 181 def eff @eff end |
Class Method Details
.async(asynth) ⇒ Object
159 160 161 |
# File 'lib/ruff/standard/async.rb', line 159 def async(asynth) @inst.async asynth end |
.await(p) ⇒ Object
164 165 166 |
# File 'lib/ruff/standard/async.rb', line 164 def await(p) @inst.await p end |
.with(&th) ⇒ Object
174 175 176 |
# File 'lib/ruff/standard/async.rb', line 174 def with(&th) @inst.with(&th) end |
.yield ⇒ Object
169 170 171 |
# File 'lib/ruff/standard/async.rb', line 169 def yield @inst.yield end |