cesium-native
cesium-native copied to clipboard
waitInMainThread may fail to terminate if the future waited on is rejected
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.