def run(self, data): if self.closed: raise userError(u"run/1: Couldn't write to closed file") with ruv.scopedBufs([data]) as bufs: ruv.fsWrite(self._vat.uv_loop, self._fs, self._fd, bufs, 1, -1, writeFileCB)
def run(self, data): if self.closed: raise userError(u"run/1: Couldn't write to closged file") sb = ruv.scopedBufs([data], self) bufs = sb.allocate() fs = ruv.alloc_fs() ruv.stashFS(fs, (self._vat, sb)) ruv.fsWrite(self._vat.uv_loop, fs, self._fd, bufs, 1, -1, writeFileCB)
def queueWrite(self): with ruv.scopedBufs([self.data]) as bufs: ruv.fsWrite(self.vat.uv_loop, self.fs, self.fd, bufs, 1, -1, writeSetContentsCB)
def queueWrite(self): with ruv.scopedBufs(self.bufs) as bufs: ruv.fsWrite(self.vat.uv_loop, self.fs, self.fd, bufs, len(self.bufs), -1, writeCB)
def queueWrite(self): with ruv.scopedBufs([self.data]) as bufs: ruv.fsWrite(self.vat.uv_loop, self.fs, self.fd, bufs, 1, self.pos, writeSetContentsCB)
def queueWrite(self): with ruv.scopedBufs(self.bufs) as bufs: ruv.fsWrite(self.vat.uv_loop, self.fs, self.fd, bufs, len(self.bufs), self.pos, writeCB)