Schedule a flush on the channel.
()
| 61 | * Schedule a flush on the channel. |
| 62 | */ |
| 63 | void scheduleFlush() { |
| 64 | if (scheduled.compareAndSet(false, true)) { |
| 65 | // Add the queue to the tail of the event loop so writes will be executed immediately |
| 66 | // inside the event loop. Note DO NOT do channel.write outside the event loop as |
| 67 | // it will not wake up immediately without a flush. |
| 68 | channel.eventLoop().execute(later); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Enqueue a write command on the channel. |