Example #1
0
 def _send(self, dataType, args=None):
     import struct
     stream = BytesIO()
     Pickler(stream).dump((dataType, args))
     raw_data = stream.getvalue()
     self.pipe_c2p.write(struct.pack("<i", len(raw_data)))
     self.pipe_c2p.write(raw_data)
     self.pipe_c2p.flush()
 def _send(self, data_type, args=None):
     """
 :param str data_type:
 :param object args:
 """
     assert data_type is not None
     import struct
     stream = BytesIO()
     Pickler(stream).dump((data_type, args))
     raw_data = stream.getvalue()
     assert len(raw_data) > 0
     self.pipe_c2p.write(struct.pack("<i", len(raw_data)))
     self.pipe_c2p.write(raw_data)
     self.pipe_c2p.flush()
Example #3
0
 def _send(self, dataType, args=None):
     Pickler(self.pipe_c2p).dump((dataType, args))
     self.pipe_c2p.flush()
Example #4
0
 def _send(self, data):
   Pickler(self.pipe_c2p).dump(data)
   self.pipe_c2p.flush()
Example #5
0
 def _send(self, v):
     assert os.getpid() == self.parent_pid
     p = self.pipe_p2c[1]  # see _start_child
     Pickler(p).dump(v)