src/threadsafeclient.php
public function ensure_thread()
    {
        if (!$this->is_thread_running)
        {
            $this->is_thread_running = true;
            $this->thread_cond = \Cond::create();
            $this->thread_mutex = \Mutex::create();
            $this->start();
        }
    }
public function ensure_thread()
    {
        if (!$this->is_thread_running)
        {
            $this->is_thread_running = true;
            $this->thread_cond = \Cond::create();
            $this->thread_mutex = \Mutex::create();
            $this->start();
        }
    }
the consumer makes an asynchronous publish call.