Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1798)

Unified Diff: base/threading/platform_thread_posix.cc

Issue 2790473006: Replace IOAllowed with WaitAllowed in PlatformThread::Join()
Patch Set: allow in IOThreadPreCleanup() Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/threading/platform_thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_posix.cc
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
index 9a6a2bb999c4fe80adc83f874a0a08ea7b72116c..b2cd67e8083305c6d26e9a701f71c6f8b3c7154d 100644
--- a/base/threading/platform_thread_posix.cc
+++ b/base/threading/platform_thread_posix.cc
@@ -211,13 +211,14 @@ bool PlatformThread::CreateNonJoinableWithPriority(size_t stack_size,
// static
void PlatformThread::Join(PlatformThreadHandle thread_handle) {
- // Record the event that this thread is blocking upon (for hang diagnosis).
- base::debug::ScopedThreadJoinActivity thread_activity(&thread_handle);
-
// Joining another thread may block the current thread for a long time, since
// the thread referred to by |thread_handle| may still be running long-lived /
// blocking tasks.
- base::ThreadRestrictions::AssertIOAllowed();
+ base::ThreadRestrictions::AssertWaitAllowed();
+
+ // Record the event that this thread is blocking upon (for hang diagnosis).
+ base::debug::ScopedThreadJoinActivity thread_activity(&thread_handle);
+
CHECK_EQ(0, pthread_join(thread_handle.platform_handle(), NULL));
}
« no previous file with comments | « no previous file | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698