Make AtomicNotificationQueue::size() TSAN-clean
Summary: taskExecuteCount_ can be incremented from a single thread, but reading it from another thread is still technically a data race. Mark it as atomic to make TSAN happy. Also make sure we never return < 0 when called from a non-consumer thread (since we only have the synchronization guarantee on the consumer thread). Differential Revision: D24523284 fbshipit-source-id: 6185125e132d71a83a3f29c909b7e4eab09e6e79
Showing
Please register or sign in to comment