Re: How to synchronously shutdown the event manager loop

2011-08-31 Thread Bas van Dijk
On 31 August 2011 01:11, Bas van Dijk v.dijk@gmail.com wrote: So it seems like a bug in GHC. I will create a ticket in the morning. Ticket created: http://hackage.haskell.org/trac/ghc/ticket/5443 ___ Glasgow-haskell-users mailing list

How to synchronously shutdown the event manager loop

2011-08-30 Thread Bas van Dijk
Hello, In my (still unreleased) usb-1.0 (https://github.com/basvandijk/usb) library I use the GHC event manager for managing events from the underlying `libusb` C library. To work with the library a user has to initialize it using: newCtx ∷ IO Ctx The `Ctx` then allows the user to see the USB

Re: How to synchronously shutdown the event manager loop

2011-08-30 Thread Bryan O'Sullivan
On Tue, Aug 30, 2011 at 6:49 AM, Bas van Dijk v.dijk@gmail.com wrote: As you see I also kill the thread which is running the event manager loop. However I think this is not the right way to do it because when I use the library I see the following message being continually printed after

Re: How to synchronously shutdown the event manager loop

2011-08-30 Thread Bas van Dijk
On 30 August 2011 17:39, Bryan O'Sullivan b...@serpentine.com wrote: On Tue, Aug 30, 2011 at 6:49 AM, Bas van Dijk v.dijk@gmail.com wrote: As you see I also kill the thread which is running the event manager loop. However I think this is not the right way to do it because when I use the

Re: How to synchronously shutdown the event manager loop

2011-08-30 Thread Bas van Dijk
On 31 August 2011 00:15, Bas van Dijk v.dijk@gmail.com wrote: I see what I can do. I'm first going to export the 'finished' function from GHC.Event and use that to wait till the loop finishes and see if that solves my problem. Waiting till the loop finishes doesn't solve the problem.