#4329: GHC.Conc modifyTVar primitive
---------------------------------------------------+------------------------
Reporter: dmbarbour | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.12.3
Keywords: TVar, STM, modifyTVar, Concurrency | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------------------------+------------------------
Changes (by simonpj):
* cc: thar...@… (added)
Comment:
Tim Harris writes: not sure if this is what the original authors intend,
but one option would be to execute all these modifications at commit-time.
I.e. the log entry would be `<tvar, f`> pairs for these tvars, rather than
`<tvar, old, new>` triples.
At commit time these entries would be expanded to `<tvar, old, new>`
triples, and then attempt to be committed in the normal way.
If there is a subsequent conflict on one of these tvars then "f" would be
re-evaluated and then the commit re-started.
There'd be some details to work through if the same tvar is read/written
directly in the same tx.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4329#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs