summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorjiayl@webrtc.org <jiayl@webrtc.org>2014-09-26 16:57:07 +0000
committerjiayl@webrtc.org <jiayl@webrtc.org>2014-09-26 16:57:07 +0000
commit7d69c85330b70fea44350aa0abac6a5cad2b2e73 (patch)
tree8f33cb3082e97988fe939161ad6216f4e2ad5b36 /base
parent0d985d7cf8a5ebae12db960b276ac925e6db41e3 (diff)
downloadwebrtc-7d69c85330b70fea44350aa0abac6a5cad2b2e73.tar.gz
Do not assert for blocking call allowed in Thread::Join.
We do not allow blocking call from the worker thread, but on Android the worker thread may stop/join a SignalThread, which hits the assert. AssertBlockingIsAllowedOnCurrentThread is used to make sure a thread does not do Invoke, so check that in Thread::Join does not seem to add much value. BUG=3857 R=juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/24709004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@7308 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'base')
-rw-r--r--base/thread.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/thread.cc b/base/thread.cc
index 40257ab8..aa2442f3 100644
--- a/base/thread.cc
+++ b/base/thread.cc
@@ -312,10 +312,13 @@ void Thread::SafeWrapCurrent() {
}
void Thread::Join() {
- AssertBlockingIsAllowedOnCurrentThread();
-
if (running()) {
ASSERT(!IsCurrent());
+ if (Current() && !Current()->blocking_calls_allowed_) {
+ LOG(LS_WARNING) << "Waiting for the thread to join, "
+ << "but blocking calls have been disallowed";
+ }
+
#if defined(WEBRTC_WIN)
ASSERT(thread_ != NULL);
WaitForSingleObject(thread_, INFINITE);