Mercurial > hg > truffle
diff src/share/vm/utilities/taskqueue.cpp @ 342:37f87013dfd8
6711316: Open source the Garbage-First garbage collector
Summary: First mercurial integration of the code for the Garbage-First garbage collector.
Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
author | ysr |
---|---|
date | Thu, 05 Jun 2008 15:57:56 -0700 |
parents | a61af66fc99e |
children | 81cd571500b0 |
line wrap: on
line diff
--- a/src/share/vm/utilities/taskqueue.cpp Wed Jun 04 13:51:09 2008 -0700 +++ b/src/share/vm/utilities/taskqueue.cpp Thu Jun 05 15:57:56 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; }