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 <yevgeny.y.rouban@intel.com>
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 131e2b6..b3d14f0 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -1094,7 +1094,7 @@
if (lock != nullptr) {
SirtRef<mirror::Object> sirt_obj(self, lock);
ObjectLock<mirror::Object> locker(self, &sirt_obj);
- locker.Notify();
+ locker.NotifyAll();
}
}