_release_lock() protected method

Release lock
protected _release_lock ( ) : boolean
return boolean
 protected function _release_lock()
 {
     return parent::_release_lock($session_id);
 }
コード例 #2
0
 /**
  * Release lock
  *
  * Releases a previously acquired lock
  *
  * @return	bool
  */
 protected function _release_lock()
 {
     if (!$this->_lock) {
         return TRUE;
     }
     if ($this->_platform === 'mysql') {
         if ($this->_db->query("SELECT RELEASE_LOCK('" . $this->_lock . "') AS ci_session_lock")->row()->ci_session_lock) {
             $this->_lock = FALSE;
             return TRUE;
         }
         return FALSE;
     } elseif ($this->_platform === 'postgre') {
         if ($this->_db->simple_query('SELECT pg_advisory_unlock(' . $this->_lock . ')')) {
             $this->_lock = FALSE;
             return TRUE;
         }
         return FALSE;
     }
     return parent::_release_lock();
 }