[GUI] Another call for votes

Wolfgang Thaller wolfgang.thaller@gmx.net
Mon, 17 Mar 2003 22:45:07 +0100


OK, here's another call for votes:

1) CGA should use callbacks
[I think everyone agreed]

2) For every callback, there should be a register function.
The register function should return an IO action that can be used to 
unregister the callback.

3) An event loop should only dispatch one callback at once - in other 
words, no concurrency unless the user asks for it.

4) Thread-safety

[Now that's where we didn't all agree...]

	4a) All CGA functions must be called from the same concurrent Haskell 
thread.

	4b) Same as 4a, plus: Calling CGA functions should not block other 
concurrent Haskell threads (except if the function is guaranteed to 
finish in a short time).

	4c) CGA functions may be called from everywhere, at any time. Calling 
CGA functions should not block other concurrent Haskell threads (except 
if the function is guaranteed to finish in a short time).

	4d) First wait and see if 4c is implementable; if not, fall back to 4b.

I vote for 1,2,3, and for 4c [I'm convinced it is implementable; 4d is 
fine for me, too].
BTW, I think that we don't have to reach a conclusion on 4 now - as 
long as 3 is accepted by everyone, we can postpone any decision on 4 
until we start implementing.

Cheers,

Wolfgang