[GHC] #9321: Support for waiting on multiple MVars
GHC
ghc-devs at haskell.org
Fri Jul 18 09:26:43 UTC 2014
#9321: Support for waiting on multiple MVars
-------------------------------------+-------------------------------------
Reporter: schyler | Owner: simonmar
Type: feature | Status: new
request | Milestone:
Priority: normal | Version: 7.8.3
Component: Runtime | Keywords: mvar
System | Operating System: Unknown/Multiple
Resolution: | Type of failure: None/Unknown
Differential Revisions: | Test Case:
Architecture: | Blocking:
Unknown/Multiple |
Difficulty: Unknown |
Blocked By: |
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by simonmar):
I think it's really really hard to add support for multi-MVar operations.
So I'm with Simon: we should put our efforts into improving STM instead.
On the fairness point, MVar's fairness guarantee means that MVar actually
performs quite badly under contention, due to the excessive number of
context switches. Have you measured your application using both MVar and
STM? STM transactions with only a few TVars perform quite well in my
experience, and tend to outperform MVar under heavy contention.
Nevertheless, if you want to go ahead with this, you'll need (a) a clear
description of the desired semantics, and (b) a detailed implementation
plan. I think you'll encounter lots of problems trying to do both of
these.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9321#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list