netty5/common/src
Tim Brooks 181c159c24 Remove unneeded calls to hasScheduledTasks() when fetching from scheduled task queue for event executors.
Motivation:

Currently in the single threaded and global event executors when the scheduled task queue is drained, there is a call to hasScheduledTasks(). If there are scheduled tasks then the the code polls the queue for tasks. The poll method duplicates the exact logic of hasScheduledTasks(). This involves two calls to nanoTime when one seems sufficient.

Modifications:

Directly poll the queue for tasks and break if the task returned is null.

Result:

Should be no noticeable impact on functionality. Two calls to nanoTime have been coarsened into a single call.
2016-07-01 17:16:58 +02:00
..
main Remove unneeded calls to hasScheduledTasks() when fetching from scheduled task queue for event executors. 2016-07-01 17:16:58 +02:00
test Remove unsafe char[] access in PlatformDependent 2016-06-30 08:58:28 -07:00