From 63e8a68c9a2cdbbe9bfd8d200610119dd359ee59 Mon Sep 17 00:00:00 2001 From: Yevgeny Rouban Date: Wed, 16 Apr 2014 18:26:09 +0700 Subject: [PATCH] Fix thread join hangs Current implementation notifies only one of joining threads on thread exit. This causes the other joining threads to hang. This patch notifies all joining threads: just call NotifyAll() instead of Notify(). Change-Id: If75f101d3d3d876f1aa7dcf537e56a37cc347803 Signed-off-by: Yevgeny Rouban --- runtime/thread.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/thread.cc b/runtime/thread.cc index 131e2b6e4..b3d14f059 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -1094,7 +1094,7 @@ void Thread::Destroy() { if (lock != nullptr) { SirtRef sirt_obj(self, lock); ObjectLock locker(self, &sirt_obj); - locker.Notify(); + locker.NotifyAll(); } } -- 2.11.0