submitString


Description:

public PromiseString submitString (owned TaskFunc<string> task)

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 ();

Parameters:

task

the task to execute.

Returns:

a PromiseString for the pending result.