EventLoop

sys.thread.EventLoop (Class)

An event loop implementation used for sys.thread.Thread

Instance Members

progress(): Anonymous

Executes all pending events.

The returned time stamps can be used with Sys.time() for calculations.

Depending on a target platform this method may be non-reentrant. It must not be called from event callbacks.

Returns
Anonymous

loop(): Void

Execute all pending events. Wait and execute as many events as the number of times promise() was called. Runs until all repeating events are cancelled and no more events are expected.

Depending on a target platform this method may be non-reentrant. It must not be called from event callbacks.


new(): Void

Private Members

CREATED: Bool

mutex: Mutex

oneTimeEvents: Array<Null<Function>>

oneTimeEventsIdx: Int

waitLock: Lock

promisedEventsCount: Int


isMainThread: Bool