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

Method SharedMemory

Lib/multiprocessing/managers.py:1416–1426  ·  view source on GitHub ↗

Returns a new SharedMemory instance with the specified size in bytes, to be tracked by the manager.

(self, size)

Source from the content-addressed store, hash-verified

1414 self._authkey, self._serializer)
1415
1416 def SharedMemory(self, size):
1417 """Returns a new SharedMemory instance with the specified size in
1418 bytes, to be tracked by the manager."""
1419 with self._Client(self._address, authkey=self._authkey) as conn:
1420 sms = shared_memory.SharedMemory(None, create=True, size=size)
1421 try:
1422 dispatch(conn, None, 'track_segment', (sms.name,))
1423 except BaseException as e:
1424 sms.unlink()
1425 raise e
1426 return sms
1427
1428 def ShareableList(self, sequence):
1429 """Returns a new ShareableList instance populated with the values

Calls 2

unlinkMethod · 0.95
dispatchFunction · 0.70