ImmediateDispatcher
このコンテンツはまだ日本語訳がありません。
Defined in: src/Dispatcher.ts:134
Runs work via setImmediate (or setTimeout(0) in browsers), so I/O and timers interleave between every actor turn. It was the default until HybridDispatcher, which pays this hop on one turn in DEFAULT_HYBRID_DISPATCHER_YIELD_UNITS instead of on every one. Choose this one where every turn must yield to the event loop.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ImmediateDispatcher():
ImmediateDispatcher
Returns
Section titled “Returns”ImmediateDispatcher
Properties
Section titled “Properties”
readonlyid:"immediate-dispatcher"='immediate-dispatcher'
Defined in: src/Dispatcher.ts:135
Implementation of
Section titled “Implementation of”onError?
Section titled “onError?”
optionalonError?:DispatcherErrorSink
Defined in: src/Dispatcher.ts:136
Where a unit of work that threw is reported. Optional so a
third-party dispatcher stays a two-member implementation: an unset
sink falls back to console.error, which is what every dispatcher
did before the slot existed.
ActorSystem fills it in with ??=, so a sink the owner set
deliberately survives being handed to a system.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”execute()
Section titled “execute()”execute(
task):void
Defined in: src/Dispatcher.ts:137
Schedule a unit of work to be executed asynchronously.
Parameters
Section titled “Parameters”() => void | Promise<void>
Returns
Section titled “Returns”void
