Re: synchronizing MVar ( was compiling concurrent haskell with ghc )

2003-07-30 Thread Dean Herington
On Wed, 30 Jul 2003, Dennis Sidharta wrote: > Hi again, > > I have tried to play around with MVar today, but > still... I did not see how to synchronize MVar without > the help of forkIO, and then explicitly call yield :: > IO (). But then, if I use forkIO I will create "daemon > threads" that wi

Re: synchronizing MVar ( was compiling concurrent haskell with ghc )

2003-07-30 Thread Dennis Sidharta
Hi again, I have tried to play around with MVar today, but still... I did not see how to synchronize MVar without the help of forkIO, and then explicitly call yield :: IO (). But then, if I use forkIO I will create "daemon threads" that will cause my program to terminates immediately (back to the

Re: compiling concurrent haskell with ghc

2003-07-28 Thread Dennis Sidharta
Hi Sven,   Thanks for the pointer! I will try to play around with MVar.     Sincerely,   DennisSven Panne <[EMAIL PROTECTED]> wrote: Dennis Sidharta wrote:> [ problems with concurrent Haskell ]I can see two problems in your code:* forkIO creates "daemon threads", so the program terminates immediat

Re: compiling concurrent haskell with ghc

2003-07-28 Thread Sven Panne
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 her

Re: compiling concurrent haskell with ghc

2003-07-28 Thread Dennis Sidharta
Hi Keith,   With this email I attached the source code. As you can see, it is very simple. And in case you would like to know, I wrote that program for a short tutorial on Haskell for a programming language course I took last semester.   Thank you very much.     Blessings,   Dennis Keith Wansbroug

Re: compiling concurrent haskell with ghc

2003-07-28 Thread Keith Wansbrough
> Hi all, > > I have a question on compiling a concurrent haskell source code > using GHC. Today is my first time playing around with concurrency in > Haskell, and this afternoon, GHC seemed to be able to compile my > code and produced an executable. However, that executable did not > seem to run

compiling concurrent haskell with ghc

2003-07-27 Thread Dennis Sidharta
Hi all,   I have a question on compiling a concurrent haskell source code using GHC. Today is my first time playing around with concurrency in Haskell, and this afternoon, GHC seemed to be able to compile my code and produced an executable. However, that executable did not seem to run the program c