Hi Sven,
 
Thanks for the pointer! I will try to play around with MVar.
 
 
Sincerely,
 
Dennis

Sven Panne <Sven.Panne@informatik.uni-muenchen.de> wrote:
Dennis Sidharta wrote:
> [ problems with concurrent Haskell ]

I can see two problems in your code:

* forkIO creates "daemon threads", so the program terminates immediately.

* Chan is an unbounded channel, so you won't get a "ping pong", which
is probably what you expected. MVar is your friend here.

See http://haskell.org/ghc/docs/latest/html/base/Control.Concurrent.html

Cheers,
S.


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software