Mercurial > hg > graal-compiler
diff src/share/vm/utilities/taskqueue.cpp @ 360:5d254928c888
Merge
author | ysr |
---|---|
date | Wed, 27 Aug 2008 11:20:46 -0700 |
parents | 37f87013dfd8 |
children | 81cd571500b0 |
line wrap: on
line diff
--- a/src/share/vm/utilities/taskqueue.cpp Wed Aug 27 10:56:33 2008 -0700 +++ b/src/share/vm/utilities/taskqueue.cpp Wed Aug 27 11:20:46 2008 -0700 @@ -65,7 +65,8 @@ os::sleep(Thread::current(), millis, false); } -bool ParallelTaskTerminator::offer_termination() { +bool +ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) { Atomic::inc(&_offered_termination); juint yield_count = 0; @@ -91,7 +92,8 @@ sleep(WorkStealingSleepMillis); } - if (peek_in_queue_set()) { + if (peek_in_queue_set() || + (terminator != NULL && terminator->should_exit_termination())) { Atomic::dec(&_offered_termination); return false; }