[GHC] #13944: Introduce synchronized FFI
GHC
ghc-devs at haskell.org
Mon Jul 10 02:06:11 UTC 2017
#13944: Introduce synchronized FFI
-------------------------------------+-------------------------------------
Reporter: winter | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by winter):
OK, now i'm pretty sure what `synchronized` would do, it will behave just
like a `safe` FFI call with one difference: a task which comes across a
`synchronized` call will give off its capacity, but will not hand off it
to other tasks unless that's a GC task. This means `synchronized` calls
will still block whole capacity, but it will not spawn new threads, nor
blocking GC.
I'm not sure if this make sense, it seems the overhead of safe FFI calls
come from both the capacity transfer and creating new OS threads. But i'm
not sure which is more costly.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13944#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list