Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
The best way to circumvent the lack of Thread.kill ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-09 (13:30)
From: Jonathan Bryant <jtbryant@v...>
Subject: Re: [Caml-list] The best way to circumvent the lack of Thread.kill ?
That's helpful.  Anybody have any information on the second question? 
The two have to work together in my app.

It's a client/server library and I have several threads.  One simply
acepts connections and 'spawns' (not really, but) new threads.  To
control this thread I need to alternate between two blocking calls: and Event.sync.  I think it is rather clear why being able
to send a signal to that thread would be helpful :).  Also, there is a
pool of worker threads that will need to sleep until they are needed. 
Since my protocol is not request-response, I can't simply have the
workers alternate between Event.sync (Event.send) and Event.sync
(Event.receive) calls.

Any ideas?

On Wed, 2005-11-09 at 02:09, Matthieu Dubuget wrote:
> Jonathan Bryant a écrit :
> >Ok.  Two questions.
> >
> >First of all, what is going on in the Event module?  I can't exactly get
> >it to work an I fear I'm missing some important concept.  I can't find
> >any documentation other than the interface.  Does anybody know of any
> >further documeeentation or have a good explanation of exactly what's
> >going on.
> >
> >  
> >
> I asked a question related to Event usage there some time ago:
> and Rémi Vanicat answered with clean explanations:
> Maybe that will help you too?
> Salutations
--Jonathan Bryant
  Student Intern
  Unix System Operations
  VSU Information Technology

"Das Leben ohne Music ist einfach ein Irrtum, eine Strapaze, ein" Exil."
("Life without music is simply an error, a pain, an exile.")
--Frederich Nietzsche

"The three cardinal values of a programmer are laziness, impatience, and
--Perl Man Page