public function onWriteOnce($cb)
    {
        if (!$this->writing) {
            $cb($this);
            return;
        }
        $this->onWriteOnce->push($cb);
    }
public function onWriteOnce($cb)
    {
        if (!$this->writing) {
            $cb($this);
            return;
        }
        $this->onWriteOnce->push($cb);
    }
public function onWriteOnce ( $ cb ) { if ( ! $ this -> writing ) { $ cb ( $ this ) ; return ; } $ this -> onWriteOnce -> push ( $ cb ) ; }
Push callback which will be called only once, when writing is available next time
@param  callable $cb Callback
@return void
Push callback which will be called only once when writing is available next time