If you call waitInMainThread on a Future, and then that Future rejects, the waitInMainThread may never return. The problem is that QueuedScheduler::dispatchUntilTaskCompletes registers for task completion with a .then continuation, which isn't called when the task rejects. Fixing this may be as simple as using the overload of .then that takes a async::task instead of the resolved value.
If you call
waitInMainThread
on a Future, and then that Future rejects, thewaitInMainThread
may never return. The problem is thatQueuedScheduler::dispatchUntilTaskCompletes
registers for task completion with a.then
continuation, which isn't called when the task rejects. Fixing this may be as simple as using the overload of.then
that takes aasync::task
instead of the resolved value.