promise

fnPromise!T promise(T)() @safe

Create a new promise/future pair.

This is the primary way to create futures. The returned promise can be used to complete the associated future.

Parameters

TThe type of value the future will hold.

Returns

A new promise that can be used to complete its associated future.