src/Worker.php
function goWait($maxExecution = null)
    {
        # Go For Jobs
        #
        $jobExecution = 0; $sleep = 0;
        while ( 1 )
        {
            if ( 0 == $executed = $this->goUntilEmpty() ) {
                // List is Empty; Smart Sleep
                $sleep += 100000;
                usleep($sleep);
                if ($sleep > 2 * 1000000)
                    // Sleep more than 2 second not allowed!!
                    $sleep = 100000;

                continue;
            }

            $jobExecution += $executed;
            if ($jobExecution >= $maxExecution)
                // Maximum Execution Task Exceed!!
                break;

            if ( $sleep = $this->getSleep() )
                // Take a breath between hooks
                usleep($sleep);

            $sleep = 0;
        }
    }
function goWait($maxExecution = null)
    {
        # Go For Jobs
        #
        $jobExecution = 0; $sleep = 0;
        while ( 1 )
        {
            if ( 0 == $executed = $this->goUntilEmpty() ) {
                // List is Empty; Smart Sleep
                $sleep += 100000;
                usleep($sleep);
                if ($sleep > 2 * 1000000)
                    // Sleep more than 2 second not allowed!!
                    $sleep = 100000;

                continue;
            }

            $jobExecution += $executed;
            if ($jobExecution >= $maxExecution)
                // Maximum Execution Task Exceed!!
                break;

            if ( $sleep = $this->getSleep() )
                // Take a breath between hooks
                usleep($sleep);

            $sleep = 0;
        }
    }
Go Running The Worker Processes

@param int $maxExecution