[Haskell-cafe] a question about concurrent haskell

2008-09-18 Thread Manlio Perillo
Hi. I have a question about concurrent Haskell in GHC. Suppose I want to write a native pure Haskell PostgreSQL client. I have done this for Python (using Twisted): http://hg.mperillo.ath.cx/twisted/pglib/ and I would like to do this in Haskell, as an exercise. The main problem is with

Re: [Haskell-cafe] a question about concurrent haskell

2008-09-18 Thread Andrew Coppin
Manlio Perillo wrote: The GHC concurrent Haskell does not have a function to resume a given thread (as found, as an example, in Lua). It does, however, provide the MVar, which can be used to make a thread block until some data is inserted into the MVar by another thread.

Re: [Haskell-cafe] a question about concurrent haskell

2008-09-18 Thread Manlio Perillo
Andrew Coppin ha scritto: Manlio Perillo wrote: The GHC concurrent Haskell does not have a function to resume a given thread (as found, as an example, in Lua). It does, however, provide the MVar, which can be used to make a thread block until some data is inserted into the MVar by another

Re: [Haskell-cafe] a question about concurrent haskell

2008-09-18 Thread Don Stewart
manlio_perillo: Hi. I have a question about concurrent Haskell in GHC. Suppose I want to write a native pure Haskell PostgreSQL client. I have done this for Python (using Twisted): http://hg.mperillo.ath.cx/twisted/pglib/ and I would like to do this in Haskell, as an exercise. The

Re: [Haskell-cafe] a question about concurrent haskell

2008-09-18 Thread Bulat Ziganshin
Hello Manlio, Thursday, September 18, 2008, 11:01:10 PM, you wrote: you just need to handle it in a message-passing way. this type of problem (serializing access to unique resource) is rather common, for example it's used in GUI libs. std way is to create thread that will do actual work in