[GHC] #9539: TQueue can lead to thread starvation

GHC ghc-devs at haskell.org
Sun May 27 09:48:47 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 YitzGale):

 In the case where you have a small number of initial writes, a single
 read, and then many writes, doesn't this queue degrade to {{{O(n^2)}}}?
 Because the read effectively bounds the buffer to a small maximum size.

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


More information about the ghc-tickets mailing list