[GHC] #9261: -S prints incorrect number of bound tasks

GHC ghc-devs at haskell.org
Tue Mar 17 18:24:22 UTC 2015


#9261: -S prints incorrect number of bound tasks
-------------------------------------+-------------------------------------
        Reporter:  edsko             |                   Owner:  thomie
            Type:  bug               |                  Status:  new
        Priority:  low               |               Milestone:
       Component:  Runtime System    |                 Version:  7.8.2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by thomie):

 * keywords:  newcomer =>
 * owner:  simonmar => thomie


Comment:

 @edsko: I think the code is correct ''as is''.

 `taskCount` is not decremented when a worker task is stopped, but only
 when `freeMyTask` is called, which frees the task bound to the current
 thread. So `taskCount` is the current number of bound tasks + the total
 number of worker tasks.

 I suggest to just add a comment to the definition of `taskCount`: `//
 currentBoundCount + workerCount`. Do you agree?

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


More information about the ghc-tickets mailing list