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@7308 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -312,10 +312,13 @@ void Thread::SafeWrapCurrent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Thread::Join() {
|
void Thread::Join() {
|
||||||
AssertBlockingIsAllowedOnCurrentThread();
|
|
||||||
|
|
||||||
if (running()) {
|
if (running()) {
|
||||||
ASSERT(!IsCurrent());
|
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)
|
#if defined(WEBRTC_WIN)
|
||||||
ASSERT(thread_ != NULL);
|
ASSERT(thread_ != NULL);
|
||||||
WaitForSingleObject(thread_, INFINITE);
|
WaitForSingleObject(thread_, INFINITE);
|
||||||
|
|||||||
Reference in New Issue
Block a user