public interface SelectStrategy
|Modifier and Type||Field and Description|
Indicates the IO loop to poll for new events without blocking.
Indicates the IO loop should be retried, no blocking select to follow directly.
Indicates a blocking select should follow.
static final int SELECT
static final int CONTINUE
static final int BUSY_WAIT
int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) throws Exception
SelectStrategycan be used to steer the outcome of a potential select call.
selectSupplier- The supplier with the result of a select result.
hasTasks- true if tasks are waiting to be processed.
SELECTif the next step should be blocking select
CONTINUEif the next step should be to not select but rather jump back to the IO loop and try again. Any value >= 0 is treated as an indicator that work needs to be done.
Copyright © 2008–2022 The Netty Project. All rights reserved.