Remove the spin-lock protecting Future's executor
Summary: [Folly] Remove the spin-lock protecting `Future`'s executor. The executor can be set in a few places: * When constructing a new `Promise` and `Future` pair before handing off the `Promise` in `Future::thenImplementation`. * After invoking `SemiFuture::wait` and `Future::wait` in the non-timeout case. * In `SemiFuture` dtor, if it has a core. In the first case, the executor is set in the future thread before being read by the promise thread. In the second case, the executor is set after being read by the promise thread. In the third case, if there is a core, then no callback could have been attached. But there is no race between setting and reading. Reviewed By: djwatson Differential Revision: D7115700 fbshipit-source-id: 5a0f90a9f01a7dcf295f39d323959e91aeae26da
Showing
Please register or sign in to comment