[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select/3 call equivalent in mzscheme




--- "Michael Sperber [Mr. Preprocessor]" 
> What for?  MzScheme is multi-threaded, so the style
> of I/O programming
> is usually different from the usual single-threaded
> polling in C.

Recent experiences in Java, which has the same IO
model as Scheme (give or take), has convinced me that
non-blocking IO is useful.  In general, the overheard
of a thread is much more than the overhead of a select
call, so one can support many more connections in a
server that uses select.  This is particularly
important when implementing HTTP keep-alive, as the
server may end up holding many connections that are
inactive for a lot of the time.  In this situation the
sheer number of active but blocked threads can crash
the system.

Noel

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/