Submits a task that returns an int and returns a PromiseInt representing the pending result.
Example:
var pool = WorkerPool.withDefault ();
var promise = pool.submitInt (() => { return 42; });
int result = promise.await ();
pool.shutdown ();
| task |
the task to execute. |
|
a PromiseInt for the pending result. |