submitDouble


Description:

public PromiseDouble submitDouble (owned TaskFunc<double?> task)

Submits a task that returns a double and returns a PromiseDouble representing the pending result.

Example:

    var pool = WorkerPool.withDefault ();
var promise = pool.submitDouble (() => { return 3.14; });
double result = promise.await ();
pool.shutdown ();

Parameters:

task

the task to execute.

Returns:

a PromiseDouble for the pending result.