public function __destruct()
{
if ($this->writers_count > 0) {
$this->err_log[] = 'writers count = ' . $this->writers_count;
$this->writers_count = 0;
$this->release_access_write();
}
$this->release_writers_mutex();
if ($this->readers_count > 0) {
$this->err_log[] = 'readers count = ' . $this->readers_count;
$this->readers_count = 0;
$this->release_access_read();
}
if (!empty($this->err_log)) {
trigger_error('MultiAccess errors ' . implode("\n", $this->err_log), E_USER_NOTICE);
}
}