DescriptionFix race condition in DataFetcherSharedMemoryBase
A race condition can occur when a polling thread tries to obtain a pointer to the shared memory via a std::map, while that map is modified by the main thread.
This patch implements a fix such that the polling thread does not have direct access to the std::map where the shared memory pointers are stored. Instead the pointer is passed as an argument of the Start() method.
This patch fixes the DataFetcherSharedMemoryBaseTest.DoesPollMotionAndOrientation test on linux tsan.
BUG=284959
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221404
Patch Set 1 #Messages
Total messages: 9 (0 generated)
|