Icicle\Concurrent\Forking\Fork::getPriority PHP Method

getPriority() public method

The priority is a float between 0 and 1 that indicates the relative priority for the forked process, where 0 is very low priority, 1 is very high priority, and 0.5 is considered a "normal" priority. The value is based on the forked process's "nice" value. The priority affects the operating system's scheduling of processes. How much the priority actually affects the amount of CPU time the process gets is ultimately system-specific.
See also: Fork::setPriority()
See also: http://linux.die.net/man/2/getpriority
public getPriority ( ) : float
return float A priority value between 0 and 1.
    public function getPriority() : float
    {
        if (($nice = pcntl_getpriority($this->pid)) === false) {
            throw new ForkException('Failed to get the fork\'s priority.');
        }
        return (19 - $nice) / 39;
    }