Mitigate lock contention in BlockingWaitExecutor
Summary: `BlockingWaitExecutor::add` (and similarly `WaitExecutor`) posts the baton while holding the queue lock. If these happen in two different threads, the `drive()` thread wakes up while the lock is still held; the `add()` thread may be descheduled before the lock is released, causing the other thread to have to wait (and possibly sleep) for a while. Reviewed By: andriigrynenko Differential Revision: D25814620 fbshipit-source-id: 07d3e9afdc4647e68f996e3f0a1c007fd1596611
Showing
Please register or sign in to comment