Introduce PlatformThread::Detach |
||
Issue descriptionThe Browser Task Scheduler plans to release threads when they've been idle for a sufficiently long amount of time. At the same time, the Browser Task Scheduler unit tests also plan on cleaning up everything (including threads) before returning. This means we cannot decide at PlatformThread creation whether or not we plan to detach the thread or join against the the thread. PlatformThread::Detach would allow the above use case to work without issue.
,
Jun 10 2016
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fecb785376a19f0ee4fd965b9568c59fa26fae01 commit fecb785376a19f0ee4fd965b9568c59fa26fae01 Author: robliao <robliao@chromium.org> Date: Fri Jun 10 21:47:13 2016 Introduce PlatformThread::Detach This will allow callers to decide at runtime if they want to detach or join against a thread. This is particularly useful for threadpools that need to detach to release resources or join to clean up during unit tests. BUG= 616867 Review-Url: https://codereview.chromium.org/2033243002 Cr-Commit-Position: refs/heads/master@{#399280} [modify] https://crrev.com/fecb785376a19f0ee4fd965b9568c59fa26fae01/base/threading/platform_thread.h [modify] https://crrev.com/fecb785376a19f0ee4fd965b9568c59fa26fae01/base/threading/platform_thread_posix.cc [modify] https://crrev.com/fecb785376a19f0ee4fd965b9568c59fa26fae01/base/threading/platform_thread_unittest.cc [modify] https://crrev.com/fecb785376a19f0ee4fd965b9568c59fa26fae01/base/threading/platform_thread_win.cc |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jun 10 2016