< prev index next >

src/share/vm/gc/shenandoah/shenandoahConcurrentMark.cpp

Print this page
rev 12191 : [mq]: cancel.patch

*** 880,897 **** uint worker_id, SCMObjToScanQueue* q, ParallelTaskTerminator* terminator) { ShenandoahHeap* heap = ShenandoahHeap::heap(); int seed = 17; ! while (true) { ! if (heap->cancelled_concgc()) clear_queue(q); ! if (heap->cancelled_concgc() || ! (!try_queue(q, cl) && !try_draining_an_satb_buffer(q) && ! !try_to_steal(worker_id, cl, &seed)) ) { ! if (terminator->offer_termination()) break; } } } template <class T, bool CL> --- 880,902 ---- uint worker_id, SCMObjToScanQueue* q, ParallelTaskTerminator* terminator) { ShenandoahHeap* heap = ShenandoahHeap::heap(); int seed = 17; ! bool terminate = false; ! while (! terminate) { ! if (heap->cancelled_concgc()) { ! clear_queue(q); ! break; ! } ! for (uint i = 0; i < 10000 && ! terminate; i++) { ! if (!try_queue(q, cl) && !try_draining_an_satb_buffer(q) && ! !try_to_steal(worker_id, cl, &seed) ) { ! if (terminator->offer_termination()) terminate = true; ! } } } } template <class T, bool CL>
< prev index next >