Open
Bug 1425092
Opened 8 years ago
Updated 3 years ago
Add MozPromise::Await method
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox59 | --- | affected |
People
(Reporter: jya, Unassigned)
Details
In bug 1404997, we added an Await method that takes a MozPromise and wait synchronously until it's completed, and when so will run in the current thread a resolve or reject method.
Moving it to MozPromise allows for better move sematics and can be made to use ResolveOrRejectValue instead.
We would have:
ResolveOrRejectValue MozPromise::Await();
ResolveOrRejectValue::Then(Function&& aResolve, Function&& aReject).
Which would allow things like:
RefPtr<MozPromise> p = AsyncMethod();
p->Await()->Then(Function&& Resolve, Function&& Reject);
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•