Send a batch dict (containing _req_id + _batch) for processing.
(self, batch_with_id)
| 644 | self._lock = threading.Lock() |
| 645 | |
| 646 | def submit(self, batch_with_id): |
| 647 | """Send a batch dict (containing _req_id + _batch) for processing.""" |
| 648 | with self._lock: |
| 649 | data = pickle.dumps(batch_with_id, protocol=pickle.HIGHEST_PROTOCOL) |
| 650 | self.proc.stdin.write(struct.pack("<I", len(data))) |
| 651 | self.proc.stdin.write(data) |
| 652 | self.proc.stdin.flush() |
| 653 | |
| 654 | def read_result(self): |
| 655 | """Blocking read for one result.""" |
no outgoing calls
no test coverage detected