Skip to content

Commit

Permalink
simplify the iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBing authored Dec 18, 2023
1 parent 855e9a3 commit de31900
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ bool G1ConcurrentRefineThreadControl::activate(uint worker_id) {
}

void G1ConcurrentRefineThreadControl::worker_threads_do(ThreadClosure* tc) {
for (uint i = 0; i < (uint)_threads.length(); i++) {
tc->do_thread(_threads.at(i));
for (Thread* t : _threads) {
tc->do_thread(t);
}
}

void G1ConcurrentRefineThreadControl::stop() {
for (uint i = 0; i < (uint)_threads.length(); i++) {
_threads.at(i)->stop();
for (Thread* t : _threads) {
t->stop();
}
}

Expand Down

0 comments on commit de31900

Please sign in to comment.