Worker class
Methods
-
asCOpaquePointer()
→ COpaquePointer?
-
Convert worker to a COpaquePointer value that could be passed via native void* pointer.
-
execute<T1, T2>({required TransferMode mode, required T1 producer(), required T2 job(T1)})
→ Future<T2>
-
Plan job for further execution in the worker.
-
executeAfter(void operation(), {Long afterMicroseconds = 0})
→ void
-
Plan job for further execution in the worker.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
park({Boolean process = true, Int timeoutMicroseconds = 0})
→ Boolean
-
Park execution of the current worker until a new request arrives
or timeout specified in
timeoutMicroseconds elapsed.
-
processQueue()
→ Boolean
-
Process pending job(s) on the queue of this worker. Note that jobs scheduled
with executeAfter using non-zero timeout are not processed this way.
-
requestTermination({Boolean processScheduledJobs = true})
→ Future<void>
-
Requests termination of the worker.
-
toString()
→ String
-
String representation of the worker.
override
Static Methods
-
fromCPointer()
→ Worker
-
Create worker object from a C pointer.
-
start({Boolean errorReporting = true, String? name})
→ Worker
-
Start new scheduling primitive, such as thread, to accept new tasks via execute interface.