Browse thread
select (or polling) on in_channel?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Eijiro Sumii <eijiro_sumii@a...> |
| Subject: | Re: [Caml-list] select (or polling) on in_channel? |
From: "Alex Baretta" <alex@barettadeit.com> > My impression is that select and buffered IO are concepts that do > not live well together. Actually, I don't quite think so - buffering can often be regarded an optimization and select could be implemented just by checking the buffer in advance (as others have suggested). I also suppose there is at least some kind of buffering even inside UNIX OS kernels with a "select" (or "poll" in Solaris) system call. > I would attempt to model the problem in a multithreaded paradigm, where > the the "selecting" is implicit in the thread scheduling mechanism. I rather want to avoid multi-threading if select could be easy enough, because the former is often too tricky due to the possibility of deadlocks and races. Eijiro