Executorthat encapsulates two underlying executors. Used in cases where two distinct operation types are being used where sharing threads could adversely affect the operation of the system. For example, NIO event processing threads being used for other blocking operations (such as assembling messages). If a
CallerRunsPolicyrejected execution policy is used, the NIO event thread might deadlock, and stop processing events.
In order to work in such an environment, the secondary executor must not
CallerRunsPolicy rejected execution policy.
It is generally recommended to use a
CallerBlocksPolicy on both
|Constructor and Description|
|Modifier and Type||Method and Description|
Execute using the primary executor.
Execute using the secondary executor.