Jamm\Memory\Shm\MultiAccess::release_access_read PHP 메소드

release_access_read() 공개 메소드

public release_access_read ( Jamm\Memory\IKeyLocker $autoUnlocker = NULL )
$autoUnlocker Jamm\Memory\IKeyLocker
    public function release_access_read(IKeyLocker $autoUnlocker = NULL)
    {
        if (!empty($autoUnlocker)) {
            $autoUnlocker->revoke();
        }
        if ($this->readers_count > 0) {
            $this->readers_count--;
        }
        if ($this->readers_count <= 0) {
            $this->decrement(self::readers);
        }
        //tell to writers, that we have read and they can write now
        return true;
    }