#2028: STM slightly conservative on write-only transactions
-----------------------+----------------------------------------------------
Reporter: JulesBean | Owner:
Type: proposal | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
-----------------------+----------------------------------------------------
Comment (by simonpj):
Comment from Tim Harris:
This suggestion is OK from the point of view of correctness.
There are several special cases where we could allow transactions to
commit when we currently treat them as conflicting. E.g. any single-word
transaction is OK.
I've avoided dealing with too many of these in the absence of code we care
about performing badly (it'll add complexity and might slow down the
hopefully-common case of non-conflicting transactions).
No strong arguments against adding this one though: we could probably use
a special value in the old-val field to indicate no-previous-value so we
won't get a space code. We could also handle it specially in "retry" --
we don't need to watch for updates to a `TVar` that has been written to
but not read.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2028#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs