[GHC] #10841: Run handler on STM retry

GHC ghc-devs at haskell.org
Wed Sep 9 13:22:52 UTC 2015


#10841: Run handler on STM retry
-------------------------------------+-------------------------------------
        Reporter:  shlevy            |                   Owner:
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  libraries         |                 Version:  7.10.2
  (other)                            |
      Resolution:                    |                Keywords:  stm
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by fryguybob):

 Indeed, I don't think contention management is always automatic, just what
 practices make it viable.  There is a danger with serializing via some
 lock that all future executions will become serial once the lock is taken
 once.

 You certainly don't want users to have to write `atomicWithAbortPolicy`!

 Also note that what I gave above might not work in a system that supports
 partial aborts like Le and Fluet's ICFP paper:

 http://www.cs.rit.edu/~ml9951/icfp15.pdf

 But their work in a way avoids the problem by keeping more progress which
 might be enough to get longer transactions through anyway.  The
 pathological case being where your long transaction has a long enough
 prefix that never has a conflict and is always available to restart from.

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


More information about the ghc-tickets mailing list