@Override
  public void poll(long timeoutMs, List<NetworkSend> sends) throws IOException {
    long startTime = time.milliseconds();
    if (executorPool != null) {
      pollWithExecutorPool(timeoutMs, sends);
    } else {
      pollOnMainThread(timeoutMs, sends);
    }
    logger.trace("Selector poll total time: {} ms.", time.milliseconds() - startTime);
  }
Firstly initiate the provided sends. Then do whatever I/O can be done on each connection without blocking.
This includes completing connections, completing disconnections, initiating new sends,
or making progress on in-progress sends or receives.
<p>

When this call is completed the user can check for completed sends, receives, connections or disconnects using
{@link #completedSends()}, {@link #completedReceives()}, {@link #connected()}, {@link #disconnected()}. These
lists will be cleared at the beginning of each {@link #poll(long, List)} call and repopulated by the call if any
completed I/O.

@param timeoutMs The amount of time to wait, in milliseconds. If negative, wait indefinitely.
@param sends The list of new sends to initiate.

@throws IOException If a send is given for which we have no existing connection or for which there is
        already an in-progress send
ambry-network/src/main/java/com/github/ambry/network/Selector.java