Skip to content
  • Thomas Miedema's avatar
    5449b25d
    Clarify meaning of the RTS `taskCount` variable · 5449b25d
    Thomas Miedema authored
    In #9261, there was some confusion about the meaning of the taskCount
    stats variable in the rts.
    
    It turns out that taskCount is not decremented when a worker task is
    stopped (i.e. from workerTaskStop), 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.
    
    This makes the calculation of the current number of bound tasks in
    rts/Stats.c correct _as is_.
    
    [skip ci]
    
    Reviewed By: austin
    
    Differential Revision: https://phabricator.haskell.org/D746
    5449b25d
    Clarify meaning of the RTS `taskCount` variable
    Thomas Miedema authored
    In #9261, there was some confusion about the meaning of the taskCount
    stats variable in the rts.
    
    It turns out that taskCount is not decremented when a worker task is
    stopped (i.e. from workerTaskStop), 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.
    
    This makes the calculation of the current number of bound tasks in
    rts/Stats.c correct _as is_.
    
    [skip ci]
    
    Reviewed By: austin
    
    Differential Revision: https://phabricator.haskell.org/D746
Loading