How to synchronously shutdown the event manager loop

Bryan O'Sullivan bos at serpentine.com
Tue Aug 30 17:39:07 CEST 2011


On Tue, Aug 30, 2011 at 6:49 AM, Bas van Dijk <v.dijk.bas at 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 the `Ctx` is finalized:
>
> ghc: ioManagerWakeup: write: Bad file descriptor
>

I'm afraid we don't provide a way to shut down an event manager
synchronously at the moment. You'll have to submit a patch if you want to
add that capability.  Perhaps you could add a way to specify an "onShutdown
:: IO ()" hook that would be called by the event manager thread once it
shuts down.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20110830/90ef6ea9/attachment.htm>


More information about the Glasgow-haskell-users mailing list