On 2/16/10 6:29 PM, Julien Vermillard wrote:
Did I missed something ?
When you want to register a socket to a Selector and another thread is
calling select(); the register operation will block until select();
exit. I think that's why a queue is used.
You are 100% right. The channel registering *must* be done once the select() is done. So we should push the channel in a queue, wakeup the selector, and process the registering.

Not that complicated to implement, as soon as we process all the initialization before registering the channel on the selector.


--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com


Reply via email to