MCPcopy Index your code
hub / github.com/grpc/grpc-java / drainNow

Method drainNow

netty/src/main/java/io/grpc/netty/WriteQueue.java:110–116  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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

Callers 1

goingAwayMethod · 0.80

Calls 2

flushMethod · 0.95
eventLoopMethod · 0.80

Tested by

no test coverage detected