public function pop() :? Job
    {
        $key = $this->generateListKey();

        $element = $this->getFirstElementFromQueue($key);
        if ($element === null) {
            return null;
        }

        // Atomic ZPOP
        $this->getClient()->getRedis()->watch($key);
        while (!$this->getClient()->getRedis()->multi()->zrem($key, $element)->exec()) {
            $element = $this->getFirstElementFromQueue($key);
        }

        $this->getClient()->getRedis()->unwatch($key);

        $ref = \explode(':', $element);
        $jobId = \end($ref);
        return new Job($this, $jobId);
    }