This is slightly dated - but if the original author is looking for some general discussion around poll/select and use of non blocking IO - the following is still a good resource

http://www.kegel.com/c10k.html


Norman Rasmussen <[EMAIL PROTECTED]> wrote:
On 5/20/06, Christian Cantrell <[EMAIL PROTECTED]> wrote:
> On May 19, 2006, at 8:58 PM, Trejkaz wrote:
> I can get the component working, I just don't like the architecture.
> All the examples I've seen use an infinite loop to process packets
> from the stream rather than blocking until packets come in and then
> routing them appropriately. If I knew why it was done this way, and
> the advantages, I would probably be ok with it, but it seems like an
> unnecessary waste of resources as the infinite loop is very processor
> intensive. Any idea why the demos are done this way?

Why don't you use the java equivalent of poll or select? This way the
program will block when there's nothing to do, and only 'execute' when
data is received.

--
- Norman Rasmussen
- Email: [EMAIL PROTECTED]
- Home page: http://norman.rasmussen.co.za/

Reply via email to