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:
jiayl@webrtc.org
2014-09-26 16:57:07 +00:00
parent 384d05f362
commit 1fd362c31e

View File

@@ -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);