The OpenD Programming Language

Task.yieldForce

If the Task isn't started yet, execute it in the current thread. If it's done, return its return value, if any. If it's in progress, wait on a condition variable. If it threw an exception, rethrow that exception.

This function should be used for expensive functions, as waiting on a condition variable introduces latency, but avoids wasted CPU cycles.

struct Task(alias fun, Args...)
@property ref @trusted
yieldForce
()

Meta