submitInt


Description:

public PromiseInt submitInt (owned TaskFunc<int> task)

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

Parameters:

task

the task to execute.

Returns:

a PromiseInt for the pending result.