Skip to content

Commit

Permalink
Reduce contention in HttpRemoteTaskRunner.getKnownTasks() (#14541)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfaraz authored Jul 7, 2023
1 parent dd78e00 commit d63eff3
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1431,11 +1431,10 @@ public Collection<? extends TaskRunnerWorkItem> getPendingTasks()
}

@Override
@SuppressWarnings("GuardedBy") // Read on tasks is safe
public Collection<? extends TaskRunnerWorkItem> getKnownTasks()
{
synchronized (statusLock) {
return ImmutableList.copyOf(tasks.values());
}
return ImmutableList.copyOf(tasks.values());
}

@SuppressWarnings("GuardedBy") // Read on tasks is safe
Expand Down

0 comments on commit d63eff3

Please sign in to comment.