From: ara.t.howard@... Date: 2006-11-01T12:28:03+09:00 Subject: Re: Nonblocking IO read On Wed, 1 Nov 2006, Bjorn Borud wrote: > [ara.t.howard@noaa.gov] > | > | it can't be done. search the archives, this sort of thing almost > | always indicates a design flaw. for instance - what will your > | program do if there is no input? > > nonblocking IO is not a design-flaw; it is something that is in common > use and is supported by most languages with a decent socket API. on > some OS'es this is even available for file IO (although widespread > language support seems to lag behind). > > Java for example got proper nonblocking socket IO in 1.4 (see > JSR-000051 "New I/O APIs for the JavaTM Platform"). but it's archaic compared to event driven frameworks like http://www.monkey.org/~provos/libevent/ http://liboop.ofb.net/ in addition it's a hack in the c lib of many oses. > for examples of use you might want to check out the Reactor pattern > and other patterns for concurrent programming. afaik the reactor pattern is a synchronous pattern http://www.artima.com/articles/io_design_patterns2.html not unlike the model of libevent and liboop - which are both synchronous... am i missing something? -a -- my religion is very simple. my religion is kindness. -- the dalai lama