Submits a task that returns a string and returns a PromiseString representing the pending result.
Example:
var pool = WorkerPool.withDefault ();
var promise = pool.submitString (() => { return "hello"; });
string result = promise.await ();
pool.shutdown ();
| task |
the task to execute. |
|
a PromiseString for the pending result. |