View source
class Dispatcher
package haxe.coro.dispatchers
implements IElement<Dispatcher>
Available on all platforms
A dispatcher manages the distribution of executable code to executors,
allowing the asynchronous behavior of coroutines. Refer to the
hxcoro.dispatchers package in the hxcoro haxelib for conrete implementation.
Static variables
Variables
read onlyscheduler:IScheduler
The scheduler associated with this dispatcher. In the general case, scheduling
functions are unaware of dispatchers and it is the responsibility of the user to
ensure correct code distribution. See haxe.coro.schedulers.IScheduler.schedule
for details.
Methods
dispatch(obj:IDispatchObject):Void
Dispatches obj to be executed. While the code execution is guaranteed (as long
as the program doesn't deadlock), no assumptions should be made about how and when
exactly that occurs.