[GHC] #13554: Allow the user to provide a C function that is called on each thread the RTS creates before running any Haskell code

GHC ghc-devs at haskell.org
Sun Apr 9 16:18:47 UTC 2017


#13554: Allow the user to provide a C function that is called on each thread the
RTS creates before running any Haskell code
-------------------------------------+-------------------------------------
           Reporter:  dobenour       |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:  8.4.1
          Component:  Runtime        |           Version:  8.0.1
  System                             |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Currently, it is very difficult to use the MySQL/MariaDB client library
 with Haskell.  One must use bound threads, which comes at a performance
 penalty.  The reason is that the underlying library requires a certain
 initialization function to be called on each OS thread before any other
 functions are called.

 Similarly, it is difficult to optimally use libcurl with GHC.  The best-
 performing way to use libcurl is to have one multi handle per thread and
 to use `curl_multi_socket_action` to respond to events.  This is currently
 not possible from Haskell, at least not easily.

 (There are other issues with using libcurl from Haskell; most notably
 libcurl’s event support makes heavy use of callbacks, which are slow, to
 tell the application which file descriptors to wait for.  But that is a
 separate issue.)

 Setting milestone to 8.4.1 because I don’t think that this is difficult.

 This is a feature requ

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13554>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list