• Lucas C. Villa Real's avatar
    htop scans /proc to determine how many running tasks exist. Since that · ad991876
    Lucas C. Villa Real authored
    operation is not possible to be conducted in an atomic fashion, task
    scheduling effects can lead to a count greater than the number of actual
    processors; this is more easily noticed on machines with several CPUs
    and under heavy workload.
    This patch simply adds an upper bound on cpuCount to guarantee
    consistent reports of the number of running tasks at any given time.
    ad991876
TasksMeter.c 2.63 KB