MCPcopy Index your code
hub / github.com/python/cpython / create

Method create

Lib/multiprocessing/managers.py:1346–1354  ·  view source on GitHub ↗

Create a new distributed-shared object (not backed by a shared memory block) and return its id to be used in a Proxy Object.

(self, c, typeid, /, *args, **kwargs)

Source from the content-addressed store, hash-verified

1344 util.debug(f"SharedMemoryServer started by pid {getpid()}")
1345
1346 def create(self, c, typeid, /, *args, **kwargs):
1347 """Create a new distributed-shared object (not backed by a shared
1348 memory block) and return its id to be used in a Proxy Object."""
1349 # Unless set up as a shared proxy, don't make shared_memory_context
1350 # a standard part of kwargs. This makes things easier for supplying
1351 # simple functions.
1352 if hasattr(self.registry[typeid][-1], "_shared_memory_proxy"):
1353 kwargs['shared_memory_context'] = self.shared_memory_context
1354 return Server.create(self, c, typeid, *args, **kwargs)
1355
1356 def shutdown(self, c):
1357 "Call unlink() on all tracked shared memory, terminate the Server."

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected