407 |
|
public void transfer(E e) throws InterruptedException { |
408 |
|
if (e == null) throw new NullPointerException(); |
409 |
|
if (xfer(e, WAIT, 0) == null) { |
410 |
< |
Thread.interrupted(); |
410 |
> |
Thread.interrupted(); |
411 |
|
throw new InterruptedException(); |
412 |
< |
} |
412 |
> |
} |
413 |
|
} |
414 |
|
|
415 |
|
public boolean tryTransfer(E e, long timeout, TimeUnit unit) |
431 |
|
Object e = xfer(null, WAIT, 0); |
432 |
|
if (e != null) |
433 |
|
return (E)e; |
434 |
< |
Thread.interrupted(); |
434 |
> |
Thread.interrupted(); |
435 |
|
throw new InterruptedException(); |
436 |
|
} |
437 |
|
|