
#9656: Process and thread init/deinit hooks for C libraries -------------------------------------+------------------------------------- Reporter: 3noch | Owner: Type: feature | Status: closed request | Milestone: Priority: normal | Version: 7.8.3 Component: Compiler | Keywords: FFI Resolution: invalid | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by carter): * status: new => closed * resolution: => invalid Comment: have you looked at https://hackage.haskell.org/package/mysql and its higher level cousin mysql-simple ? that sort of thread local storage machinery is totally manageable in userland, use the forkOS primitive to start a thread in a dedicated distinct OS thread. point being, this sort of thing is manageable in userland (see also how folks hand ffi bindings to libs that need thread local storage). So unless i'm misunderstanding this ticket, im going to close it for now. Haskell- cafe or haskell reddit are good places to ask for pointers on C ffi engineering, though theres also numerous resources on the wiki and many many c ffi bindings on hackage. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9656#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler