958 |
|
} |
959 |
|
|
960 |
|
/* |
961 |
< |
* transfer attempts to insert into the queue then wait until that |
962 |
< |
* object is removed via take or poll. |
961 |
> |
* transfer attempts to insert into the queue then wait until that |
962 |
> |
* object is removed via take or poll. |
963 |
|
*/ |
964 |
|
public void testTransfer2() { |
965 |
|
final LinkedTransferQueue<Integer> q = new LinkedTransferQueue<Integer>(); |
985 |
|
} |
986 |
|
} |
987 |
|
/* |
988 |
< |
* transfer will attempt to transfer in fifo order and continue waiting if |
989 |
< |
* the element being transfered is not polled or taken |
988 |
> |
* transfer will attempt to transfer in fifo order and continue waiting if |
989 |
> |
* the element being transfered is not polled or taken |
990 |
|
*/ |
991 |
|
|
992 |
|
public void testTransfer3() { |
1003 |
|
} |
1004 |
|
} |
1005 |
|
}).start(); |
1006 |
< |
Thread interruptedThread = |
1006 |
> |
Thread interruptedThread = |
1007 |
|
new Thread(new Runnable() { |
1008 |
|
public void run() { |
1009 |
|
try { |
1028 |
|
|
1029 |
|
/** |
1030 |
|
* transfer will wait as long as a poll or take occurs if one does occur |
1031 |
< |
* the waiting is finished and the thread that tries to poll/take |
1031 |
> |
* the waiting is finished and the thread that tries to poll/take |
1032 |
|
* wins in retrieving the element |
1033 |
|
*/ |
1034 |
|
public void testTransfer4() { |
1186 |
|
} |
1187 |
|
|
1188 |
|
/* |
1189 |
< |
* tryTransfer attempts to enqueue into the q and fails returning false not |
1189 |
> |
* tryTransfer attempts to enqueue into the q and fails returning false not |
1190 |
|
* enqueueing and the successing poll is null |
1191 |
|
*/ |
1192 |
|
public void testTryTransfer7() { |