Concurrency (was: Re: [GUI] Re: events & callbacks)

Nick Name nick.name@inwind.it
Wed, 12 Mar 2003 19:02:41 +0100


On Wed, 12 Mar 2003 10:00:43 +0000
Axel Simon <A.Simon@ukc.ac.uk> wrote:

> I always fear that I miss something and
>  the whole system eventually falls over. So yes, one OS thread for the
>  GUI, one for the database, one for each socket,... . I think this is
>  not a restriction but the natural approach.

This sounds very reasonable to my unexpert eyes. It's important to allow
this scheme, since there is a simple and I guess frequent case of use; I
leave it for a new thread to avoid confusion.

>  Once we have OS threads, attaching something to the idle handler of
>  (Gtk's) event loop is not necessary anymore since the Haskell RTS
>  will continue to run. But every call to Gtk (or whatever library)
>  will be channeled through this one thread. Is this a restriction?

I hope not. Communication primitives are to be used sometimes :) But I
am btw no expert on the subject, it's just an impression.

Maybe the CGA could do this channeling itself? Would it be an headache
in your opinion? Tests can already be done, since it's possible to
compile GHC with -threaded-RTS or something like that.

Vincenzo