Synchronize an IngestTasksScheduler method for clarity and safety

This commit is contained in:
Richard Cordovano 2015-07-29 17:38:55 -04:00
parent e8779a86fb
commit 9a06f0448e

View File

@ -469,7 +469,7 @@ final class IngestTasksScheduler {
* @param taskQueue The queue from which to remove the tasks.
* @param jobId The id of the job for which the tasks are to be removed.
*/
private void removeTasksForJob(Collection<? extends IngestTask> taskQueue, long jobId) {
synchronized private void removeTasksForJob(Collection<? extends IngestTask> taskQueue, long jobId) {
Iterator<? extends IngestTask> iterator = taskQueue.iterator();
while (iterator.hasNext()) {
IngestTask task = iterator.next();