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: "Richard Jones" <rich@annexia.org> > > 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. > > You can implement threads on top of select / poll semantics. You also > need to have a stack switching operation (such as makecontext / > swapcontext, setjmp / longjmp, or a bit of asm). Proof by example: > http://www.annexia.org/freeware/pthrlib Yes, I think I know - my colleagues (as well as I myself) have even _taught_ how to implement threads by using select in our classes. But how is that relevant in this context? It doesn't mean multi-threading is always easier than select (in my case, for instance)...? Eijiro