[GHC] #11713: STM Finalizers
GHC
ghc-devs at haskell.org
Thu Mar 17 13:38:57 UTC 2016
#11713: STM Finalizers
-------------------------------------+-------------------------------------
Reporter: mc.schroeder | Owner: mc.schroeder
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 8.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): Phab:D2011
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonmar):
This looks like a big extra burden on the implementation - an extra field
in every TVar, two fields in the atomically frame, and lots of complexity.
I'd really rather avoid this if we can.
e.g. for serialization, I would do it exactly the way that Simon suggests,
the transaction should add its serialization instructions to a TQueue or
something that is processed by a separate thread. If you want to also
have the current thread wait until the serialization has completed, then
you can program that too using a TVar. This also allows more concurrency
than your finalizer, because it doesn't have to freeze any TVars.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11713#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list