|
|
@ -24,7 +24,6 @@ import java.util.Comparator; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.PriorityQueue; |
|
|
|
import java.util.PriorityQueue; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.concurrent.locks.Condition; |
|
|
|
|
|
|
|
import java.util.concurrent.locks.ReentrantLock; |
|
|
|
import java.util.concurrent.locks.ReentrantLock; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -47,11 +46,6 @@ public class PeerTaskInstancePriorityQueue implements TaskPriorityQueue<TaskInst |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private final ReentrantLock lock = new ReentrantLock(true); |
|
|
|
private final ReentrantLock lock = new ReentrantLock(true); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Condition for blocking when empty |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private final Condition notEmpty = lock.newCondition(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* put task instance to priority queue |
|
|
|
* put task instance to priority queue |
|
|
|
* |
|
|
|
* |
|
|
|