Struct gaffer::future::Promise [−][src]
pub struct Promise<T> { /* fields omitted */ }
Expand description
The sending side of a promise which can be used to complete a future. If 2 promises are of the same type, they can be merged and then all the futures will be resolved with clones of the result.
Implementations
Create the sending and receiving parts of the promise.
Fulfill the promise, the future will be woken and can retrieve the result, if used on a merged Promise the merged futures will receive PromiseDropped. So prefer Promise::fulfill on mergable results.
Fulfill the promise, the future will be woken and can retrieve the result. Any merged Promises will be fulfilled at the same time