Returns a new SharedMemory instance with the specified size in bytes, to be tracked by the manager.
(self, size)
| 1373 | self._authkey, self._serializer) |
| 1374 | |
| 1375 | def SharedMemory(self, size): |
| 1376 | """Returns a new SharedMemory instance with the specified size in |
| 1377 | bytes, to be tracked by the manager.""" |
| 1378 | with self._Client(self._address, authkey=self._authkey) as conn: |
| 1379 | sms = shared_memory.SharedMemory(None, create=True, size=size) |
| 1380 | try: |
| 1381 | dispatch(conn, None, 'track_segment', (sms.name,)) |
| 1382 | except BaseException as e: |
| 1383 | sms.unlink() |
| 1384 | raise e |
| 1385 | return sms |
| 1386 | |
| 1387 | def ShareableList(self, sequence): |
| 1388 | """Returns a new ShareableList instance populated with the values |