8217794: Missing termination check results violation of termination invariant
Reviewed-by: tschatzl, shade
This commit is contained in:
parent
4c63f4d399
commit
244768cbab
@ -65,6 +65,13 @@ bool OWSTTaskTerminator::offer_termination(TerminatorTerminator* terminator) {
|
||||
return true;
|
||||
} else {
|
||||
_blocker->lock_without_safepoint_check();
|
||||
// There is possibility that termination is reached between dropping the lock
|
||||
// before returning from do_spin_master_work() and acquiring lock above.
|
||||
if (_offered_termination == _n_threads) {
|
||||
_blocker->unlock();
|
||||
assert(!peek_in_queue_set(), "Precondition");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_blocker->wait(true, WorkStealingSleepMillis);
|
||||
|
Loading…
x
Reference in New Issue
Block a user