protected function decrement($type = self::readers)
{
$q = $this->select_q($type);
if (empty($q)) {
return false;
}
$recieve = msg_receive($q, $type, $t, 100, $msg, false, MSG_IPC_NOWAIT + MSG_NOERROR, $err);
if ($recieve === false) {
$counter = $this->get_counter($type);
if ($counter > 0) {
$this->err_log[] = 'Message was not recieved from queue ' . ($type == self::readers ? 'readers ' . $this->read_q_key : 'writers ' . $this->write_q_key) . ' counter: ' . $counter . ', error: ' . $err;
return false;
}
}
return true;
}