hotspot/src/share/vm/gc/shared/workgroup.cpp
changeset 40096 246c62cd9180
parent 39704 157f39705057
child 40655 9f644073d3a0
--- a/hotspot/src/share/vm/gc/shared/workgroup.cpp	Fri Jul 29 08:17:43 2016 +0000
+++ b/hotspot/src/share/vm/gc/shared/workgroup.cpp	Wed Jun 08 14:11:51 2016 -0700
@@ -274,8 +274,10 @@
             "Trying to execute task %s with %u workers which is more than the amount of total workers %u.",
             task->name(), num_workers, total_workers());
   guarantee(num_workers > 0, "Trying to execute task %s with zero workers", task->name());
-  add_workers(num_workers, false);
+  uint old_num_workers = _active_workers;
+  update_active_workers(num_workers);
   _dispatcher->coordinator_execute_on_workers(task, num_workers);
+  update_active_workers(old_num_workers);
 }
 
 AbstractGangWorker::AbstractGangWorker(AbstractWorkGang* gang, uint id) {