MCPcopy Index your code
hub / github.com/cloudpipe/cloudpickle / run

Method run

tests/testutils.py:144–155  ·  view source on GitHub ↗

Synchronous remote function call

(self, func, *args, **kwargs)

Source from the content-addressed store, hash-verified

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 = [

Calls 1

dumpsFunction · 0.90

Tested by

no test coverage detected