Fix thread unsafe usage of the RunLoop API |
|
Issue descriptionTried adding thread checks for documentation of RunLoop's API in https://codereview.chromium.org/2818533003/#ps160001 but they fire in existing codebase (which means some usage is incorrect and likely thread unsafe...).
,
May 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/980a5271bd212db2ad7a050c3d49628aed42deb1 commit 980a5271bd212db2ad7a050c3d49628aed42deb1 Author: gab <gab@chromium.org> Date: Thu May 18 16:20:16 2017 Loosen thread-safety checks and update documentation on RunLoop. RunLoop::Delegate now being the thread-affine part. RunLoop itself is now merely thread-unsafe (->sequence checks). And make it safe to access a RunLoop's state from another sequence while it's being Run() as that access is technically "sequenced" (any access will rebind the SequenceChecker to that sequence for the remainder of the run and should still catch undesired concurrent accesses). The lack of detach during Run() might also be the cause of issue 715235 (will try to remove TODOs after this lands). BUG= 722537 , 715235 Review-Url: https://codereview.chromium.org/2886913003 Cr-Commit-Position: refs/heads/master@{#472835} [modify] https://crrev.com/980a5271bd212db2ad7a050c3d49628aed42deb1/base/run_loop.cc [modify] https://crrev.com/980a5271bd212db2ad7a050c3d49628aed42deb1/base/run_loop.h |
|
►
Sign in to add a comment |
|
Comment 1 by bugdroid1@chromium.org
, May 5 2017