src/threadsafeclient.php
public function publish_async($channel, $item, $callback=null)
    {
        $export = $item->export();
        $export['channel'] = $channel;
        $uri = null;
        $auth = null;
        \Mutex::lock($this->mutex);
        $uri = $this->uri;
        $auth = $this->pcc_utilities->gen_auth_header($this->auth_jwt_claim,
                $this->auth_jwt_key, $this->auth_basic_user,
                $this->auth_basic_pass);
        $this->ensure_thread();
        \Mutex::unlock($this->mutex);
        $this->queue_req(array('pub', $uri, $auth, $export, $callback));
    }
public function publish_async($channel, $item, $callback=null)
    {
        $export = $item->export();
        $export['channel'] = $channel;
        $uri = null;
        $auth = null;
        \Mutex::lock($this->mutex);
        $uri = $this->uri;
        $auth = $this->pcc_utilities->gen_auth_header($this->auth_jwt_claim,
                $this->auth_jwt_key, $this->auth_basic_user,
                $this->auth_basic_pass);
        $this->ensure_thread();
        \Mutex::unlock($this->mutex);
        $this->queue_req(array('pub', $uri, $auth, $export, $callback));
    }
complete.