Executes enqueued work directly on the current thread. This can be used to trigger writes before performing additional reads. Must be called from the event loop. This method makes no guarantee that the work queue is empty when it returns.
()
| 108 | * guarantee that the work queue is empty when it returns. |
| 109 | */ |
| 110 | void drainNow() { |
| 111 | Preconditions.checkState(channel.eventLoop().inEventLoop(), "must be on the event loop"); |
| 112 | if (queue.peek() == null) { |
| 113 | return; |
| 114 | } |
| 115 | flush(); |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Process the queue of commands and dispatch them to the stream. This method is only |