Synchronous remote function call
(self, func, *args, **kwargs)
| 142 | self.pool.submit(id, 42).result() # start the worker process |
| 143 | |
| 144 | def run(self, func, *args, **kwargs): |
| 145 | """Synchronous remote function call""" |
| 146 | |
| 147 | input_payload = dumps((func, args, kwargs), protocol=self.protocol) |
| 148 | result_payload = self.pool.submit( |
| 149 | call_func, input_payload, self.protocol |
| 150 | ).result() |
| 151 | result = loads(result_payload) |
| 152 | |
| 153 | if isinstance(result, BaseException): |
| 154 | raise result |
| 155 | return result |
| 156 | |
| 157 | def memsize(self): |
| 158 | workers_pids = [ |
no test coverage detected