[Haskell-cafe] Broadcast signals between threads
Joachim Breitner
mail at joachim-breitner.de
Sun May 27 06:22:54 EDT 2007
Hi,
Am Samstag, den 26.05.2007, 14:29 +0200 schrieb Tomasz Zielonka:
> On Fri, May 25, 2007 at 07:57:45PM +0200, Joachim Breitner wrote:
> > I???m writing a TCP server app ATM. It has one thread per client. Some of
> > the clients want to be notified if the internal state changes, while
> > others are happily chatting with the server, possible modifying the
> > internal state. What I need now is a way for the chatting thread to
> > signal ???anyone interested??? that the state has changed.
>
> Did you consider using STM for thread synchronisation and communication?
> STM uses change notifications (or something similar) internally to
> implement the "retry" operation. I might be just what you need, but more
> high level.
No, I haven’t done anything with STM yet. Maybe I’ll look into that.
Thanks,
Joachim
--
Joachim Breitner
e-Mail: mail at joachim-breitner.de
Homepage: http://www.joachim-breitner.de
ICQ#: 74513189
More information about the Haskell-Cafe
mailing list