-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area/test flakesstalestalebot believes this issue/PR has not been touched recentlystalebot believes this issue/PR has not been touched recently
Description
DispatcherImpl::isThreadSafe is mainly used to assert that a piece of code is or isn't running in the event loop thread. However, isThreadSafe is only correct after the thread running the dispatch loop has entered DispatcherImpl::run, which sets the run_tid_ member that isThreadSafe uses. If one thread is about to start DispatcherImpl::run and another thread is testing isThreadSafe, there's technically a data race on the run_tid_ member. This situation probably only happens in tests, where it can lead to flakes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/test flakesstalestalebot believes this issue/PR has not been touched recentlystalebot believes this issue/PR has not been touched recently