Rewrite asynchronous job/futures code to not be based on std::future.
The Future class is now gone, and its functionality ("is the result ready?", "give me the result value") is now folded into AsyncJob. This allows retrieving the result from multiple threads, with synchronization handled in AsyncJob. (This is more flexible than std::future allows, since we don't need either move semantics or the ability to pass along exceptions when the future is harvested.) This fixes a number of race conditions that helgrind was flagging during startup with complex scenes. (Our prior use of std::future wasn't correct in that we had unprotected access attempts from multiple threads.)
Showing
想要评论请 注册 或 登录