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

Re: select/3 call equivalent in mzscheme



>>>>> "Noel" == Noel Welsh <noelwelsh@yahoo.com> writes:

Noel> --- "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.

Noel> Recent experiences in Java, which has the same IO
Noel> model as Scheme (give or take), has convinced me that
Noel> non-blocking IO is useful.  In general, the overheard
Noel> of a thread is much more than the overhead of a select
Noel> call,

This, in general, is patently untrue: thread overheads vary between
language implementations by about two orders of magnitude.  (Dozens of
bytes, dozens of kilobytes, megabytes.) So, a blind assumption that
Java threads are comparable in overhead to MzScheme's is pretty much
completely unfounded.

Having said that, MzScheme's threads are not the most lightweight, and
I sure wish that were not so.  For the purpose at hand, they're mostly
adequate, however.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla