Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
File: files.py Progetto: dckc/typhon
 def queueWrite(self):
     with ruv.scopedBufs([self.data]) as bufs:
         ruv.fsWrite(self.vat.uv_loop, self.fs, self.fd, bufs,
                     1, -1, writeSetContentsCB)
Esempio n. 4
0
File: files.py Progetto: dckc/typhon
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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)