[GHC] #13944: Introduce synchronized FFI

GHC ghc-devs at haskell.org
Sun Jul 9 14:50:44 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):

 I'm not even sure that my proposal work :) but let's try to have a
 discussion on this idea.

 Remember the new `-qn` RTS flag, which allow some inactive threads doesn't
 participate GC, (The word participate seems too vague, i think it means
 the thread doesn't do GC work, but do get GCed by other GC worker thread).

 Now a thread which enter `synchronized` call will behave exactly like an
 inactive thread which is not selected to do GC work, that means its root
 will get GCed by some other thread, which is OK since `synchronized` FFI
 restrict what kind of heap object it can reference.

 I'm not totally clear how this idea works because i'm not an expert on
 RTS, all clarifications and suggestions are welcomed!

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


More information about the ghc-tickets mailing list