8204166: TLH: Semaphore may not be destroy until signal have returned

Reviewed-by: eosterlund, dholmes
This commit is contained in:
Robbin Ehn 2018-06-19 10:57:13 +02:00
parent 79a09bd98b
commit f434591152
4 changed files with 52 additions and 34 deletions

View file

@ -4219,6 +4219,9 @@ bool Threads::destroy_vm() {
before_exit(thread);
thread->exit(true);
// thread will never call smr_delete, instead of implicit cancel
// in wait_for_vm_thread_exit we do it explicit.
thread->cancel_handshake();
// Stop VM thread.
{