Merge pull request #2024 from metamx/fairBigTaskQueueLock

Make the TaskQueue big lock fair
This commit is contained in:
Gian Merlino 2015-12-03 19:32:53 -08:00
commit 020a5e7081
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public class TaskQueue
private final TaskLockbox taskLockbox;
private final ServiceEmitter emitter;
private final ReentrantLock giant = new ReentrantLock();
private final ReentrantLock giant = new ReentrantLock(true);
private final Condition managementMayBeNecessary = giant.newCondition();
private final ExecutorService managerExec = Executors.newSingleThreadExecutor(
new ThreadFactoryBuilder()