Skip to content

Commit

Permalink
Make TaskLockbox's ReentrantLock fair (apache#3828)
Browse files Browse the repository at this point in the history
  • Loading branch information
drcrallen authored and fjy committed Jan 7, 2017
1 parent 3c01230 commit 229559b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class TaskLockbox
// Datasource -> Interval -> Tasks + TaskLock
private final Map<String, NavigableMap<Interval, TaskLockPosse>> running = Maps.newHashMap();
private final TaskStorage taskStorage;
private final ReentrantLock giant = new ReentrantLock();
private final ReentrantLock giant = new ReentrantLock(true);
private final Condition lockReleaseCondition = giant.newCondition();

private static final EmittingLogger log = new EmittingLogger(TaskLockbox.class);
Expand Down

0 comments on commit 229559b

Please sign in to comment.