Closes access to the shared memory from this instance but does not destroy the shared memory block.
(self)
| 223 | return self._size |
| 224 | |
| 225 | def close(self): |
| 226 | """Closes access to the shared memory from this instance but does |
| 227 | not destroy the shared memory block.""" |
| 228 | if self._buf is not None: |
| 229 | self._buf.release() |
| 230 | self._buf = None |
| 231 | if self._mmap is not None: |
| 232 | self._mmap.close() |
| 233 | self._mmap = None |
| 234 | if _USE_POSIX and self._fd >= 0: |
| 235 | os.close(self._fd) |
| 236 | self._fd = -1 |
| 237 | |
| 238 | def unlink(self): |
| 239 | """Requests that the underlying shared memory block be destroyed. |