Skip to content

Commit f6e086c

Browse files
author
Simon MacMullen
committed
Slightly closer emulation of the BlockingQueue API.
1 parent 2330f71 commit f6e086c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/rabbitmq/client/impl/WorkPool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ private WorkQueue(int maxLengthWhenLimited) {
8585
this.maxLengthWhenLimited = maxLengthWhenLimited;
8686
}
8787

88-
public boolean put(T t) throws InterruptedException {
88+
public void put(T t) throws InterruptedException {
8989
if (limited && list.size() > maxLengthWhenLimited) {
9090
assert !semaphore.hasQueuedThreads();
9191
semaphore.acquire();
9292
}
93-
return list.offer(t);
93+
list.add(t);
9494
}
9595

9696
public T poll() {

0 commit comments

Comments
 (0)