Fix assert usage. Thanks Trustin for review
This commit is contained in:
parent
cfe7b49594
commit
0beaa107b4
@ -273,7 +273,9 @@ abstract class AbstractNioWorker implements Worker {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void executeInIoThread(Runnable eventRunnable) {
|
public void executeInIoThread(Runnable eventRunnable) {
|
||||||
assert eventQueue.offer(eventRunnable);
|
boolean added = eventQueue.offer(eventRunnable);
|
||||||
|
|
||||||
|
assert added;
|
||||||
|
|
||||||
// wake up the selector to speed things
|
// wake up the selector to speed things
|
||||||
selector.wakeup();
|
selector.wakeup();
|
||||||
|
@ -90,8 +90,9 @@ abstract class AbstractOioWorker<C extends AbstractOioChannel> implements Worker
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void executeInIoThread(Runnable eventRunnable) {
|
public void executeInIoThread(Runnable eventRunnable) {
|
||||||
assert eventQueue.offer(eventRunnable);
|
boolean added = eventQueue.offer(eventRunnable);
|
||||||
|
|
||||||
|
assert added;
|
||||||
// as we set the SO_TIMEOUT to 1 second this task will get picked up in 1 second at latest
|
// as we set the SO_TIMEOUT to 1 second this task will get picked up in 1 second at latest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user