[GHC] #9539: TQueue can lead to thread starvation
GHC
ghc-devs at haskell.org
Tue Jun 12 05:52:13 UTC 2018
#9539: TQueue can lead to thread starvation
-------------------------------------+-------------------------------------
Reporter: jwlato | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Core Libraries | Version: 7.8.2
Resolution: | Keywords: stm
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by WrenThornton):
While not necessarily a solution to the problems with `TQueue` itself,
users running into issues with overactive writers can always use stm-
chans's `TBMQueue` which is a bounded (and closable) variant of `TQueue`
which has already been vetted by various folks. (Though of course if folks
find infelicities with the current implementation, I'm always open to
receive patches and bugreports.)
On the whole, from my experience in this domain, it's too much to expect a
single implementation to satisfy all users' needs. Things like realtime
queues certainly have their place, as do bare-bones queues, and explicitly
bounded queues, as do queues where popping is forever and the element gets
dropped on the floor in the event of transaction rollback, and so on.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9539#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list