On Tuesday 20 December 2005 23:43, Einar Karttunen wrote: > Your problem is that the ghci prompt *is* blocking everything. ghci is > builded non-threaded. Ghci uses a blocking call to read the lines > which means that all other computations are stopped. Ok, then pressing enter each time I want one of my servers to reply. I can live with that.
> > I compile it and run it. It returns immediately and the server of course, > > is not running. > > It spawns the server threads and returns immediately. Indeed. > > I think what I am missing is that server, after running runStreamServer > > should block and be able to reply to all the queries (in the final > > version I'll also have runDgramServer as well) and be able to receive a > > signal, upon which it should close the socket and finish. How can do that > > ? Any help will be appreciated. > > Catch the signal and kill the listening threads. If you > are using the new 0.3.1 release then you can use the > killServer call. Oh, new release, I am downloading it right now! So, I install a signal handler with installHandler... and then ? how do I prevent the program for quiting ? am I missing some kind of event loop here ? > ps. I think it may be best to continue on haskell-cafe@ rather > than the main list. I am posting to there as well (to continue there). -- Pupeno <[EMAIL PROTECTED]> (http://pupeno.com)
pgpZfnlAK6YKY.pgp
Description: PGP signature
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell