looking for quick clarification.. in hawtdispatch.. all of the threads in the SimplePool are basically "parked" if there are no tasks in the three queues to process (local, shared, source). it parks by calling select(-1) which will block/wait until there is either activity on the selection channels or wakeup() is called on the selector…
looks like in SimplePool, when a task is added, the threads in the pool are looped and asked to wakeup if they're parked?
if there's a task added to the queue, and a thread is asked to "wakeup" what happens if a selection event occurs right when it's processing the task? ie, it's not currently selecting… does it process all tasks in the queue first, then work on the selection?
also, can you shed some light on the wakeUpCounter and the selectCounter and how they're related in the NioManager? sorry for all of the questions.. think im on the right track, just need some confirmation.
Hiram Chirino
Software Fellow | FuseSource Corp.
chi...@fusesource.com | fusesource.com
skype: hiramchirino | twitter: @hiramchirino
blog: Hiram Chirino's Bit Mojo

looking for quick clarification.. in hawtdispatch.. all of the threads in the SimplePool are basically "parked" if there are no tasks in the three queues to process (local, shared, source). it parks by calling select(-1) which will block/wait until there is either activity on the selection channels or wakeup() is called on the selector…
looks like in SimplePool, when a task is added, the threads in the pool are looped and asked to wakeup if they're parked?
if there's a task added to the queue, and a thread is asked to "wakeup" what happens if a selection event occurs right when it's processing the task? ie, it's not currently selecting… does it process all tasks in the queue first, then work on the selection?
also, can you shed some light on the wakeUpCounter and the selectCounter and how they're related in the NioManager? sorry for all of the questions.. think im on the right track, just need some confirmation.