public function queue_req($req)
    {
        \Mutex::lock($this->thread_mutex);
        $this->req_queue[] = $req;
        \Cond::signal($this->thread_cond);    
        \Mutex::unlock($this->thread_mutex);
    }