void AbstractWorkGang::threads_do(ThreadClosure* tc) const { assert(tc != NULL, "Null ThreadClosure"); uint num_thr = total_workers(); for (uint i = 0; i < num_thr; i++) { tc->do_thread(gang_worker(i)); } }
void AbstractWorkGang::print_worker_threads_on(outputStream* st) const { uint num_thr = total_workers(); for (uint i = 0; i < num_thr; i++) { gang_worker(i)->print_on(st); st->cr(); } }
void WorkGang::print_worker_threads() const { uint num_thr = total_workers(); for (uint i = 0; i < num_thr; i++) { gang_worker(i)->print(); tty->cr(); } }
AbstractWorkGang::~AbstractWorkGang() { if (TraceWorkGang) { tty->print_cr("Destructing work gang %s", name()); } stop(); // stop all the workers for (uint worker = 0; worker < total_workers(); worker += 1) { delete gang_worker(worker); } delete gang_workers(); delete monitor(); }
WorkGang::~WorkGang() { if (TraceWorkGang) { tty->print_cr("Destructing work gang %s", name()); } stop_task(); for (int worker = 0; worker < total_workers(); worker += 1) { delete gang_worker(worker); } delete gang_workers(); delete monitor(); }