src/nusoap_wsdlcache.php
function obtainMutex($filename, $mode)
    {
        if (isset($this->fplock[md5($filename)])) {
            $this->debug("Lock for $filename already exists");

            return FALSE;
        }
        $this->fplock[md5($filename)] = fopen($filename . ".lock", "w");
        if ($mode == "r") {
            return flock($this->fplock[md5($filename)], LOCK_SH);
        } else {
            return flock($this->fplock[md5($filename)], LOCK_EX);
        }
    }
function obtainMutex($filename, $mode)
    {
        if (isset($this->fplock[md5($filename)])) {
            $this->debug("Lock for $filename already exists");

            return FALSE;
        }
        $this->fplock[md5($filename)] = fopen($filename . ".lock", "w");
        if ($mode == "r") {
            return flock($this->fplock[md5($filename)], LOCK_SH);
        } else {
            return flock($this->fplock[md5($filename)], LOCK_EX);
        }
    }
function obtainMutex ( $ filename , $ mode ) { if ( isset ( $ this -> fplock [ md5 ( $ filename ) ] ) ) { $ this -> debug ( "Lock for $filename already exists" ) ; return FALSE ; } $ this -> fplock [ md5 ( $ filename ) ] = fopen ( $ filename . ".lock" , "w" ) ; if ( $ mode == "r" ) { return flock ( $ this -> fplock [ md5 ( $ filename ) ] , LOCK_SH ) ; } else { return flock ( $ this -> fplock [ md5 ( $ filename ) ] , LOCK_EX ) ; } }
obtains the local mutex

@param string $filename The Filename of the Cache to lock
@param string $mode     The open-mode ("r" or "w") or the file - affects lock-mode

@return boolean Lock successfully obtained ?!
@access private
obtains the local mutex