예제 #1
0
    def unlink(self):
        """Requests that the underlying shared memory block be destroyed.

        In order to ensure proper cleanup of resources, unlink should be
        called once (and only once) across all processes which have access
        to the shared memory block."""
        if _USE_POSIX and self.name:
            _posixshmem.shm_unlink(self.name)
예제 #2
0
    def unlink(self):
        """Requests that the underlying shared memory block be destroyed.

        In order to ensure proper cleanup of resources, unlink should be
        called once (and only once) across all processes which have access
        to the shared memory block."""
        if _USE_POSIX and self._name:
            _posixshmem.shm_unlink(self._name)
예제 #3
0
    def destroy(self) -> None:
        if _USE_POSIX:
            # We manually unlink to bypass all the "resource tracker"
            # nonsense meant for non-SC systems.
            shm_unlink(self._shm.name)

        self._first.destroy()
        self._last.destroy()
예제 #4
0
 def unlink(self):
     """
     Requests destruction of this memory block.
     Unlink should be called once and only once across all processes
     """
     try:
         _posixshmem.shm_unlink(self._name)
     except FileNotFoundError:
         LOGGER.debug(f"{self.name} tried to unlink twice")
         warnings.warn("Cannot unlink a shared block twice", RuntimeWarning)
    def unlink(self):
        """Requests that the underlying shared memory block be destroyed.

        In order to ensure proper cleanup of resources, unlink should be
        called once (and only once) across all processes which have access
        to the shared memory block."""
        if _USE_POSIX and self._name:
            from .resource_tracker import unregister
            _posixshmem.shm_unlink(self._name)
            unregister(self._name, "shared_memory")
예제 #6
0
    def unlink(self) -> None:
        """Requests that the underlying shared memory block be destroyed.

        In order to ensure proper cleanup of resources, unlink should be
        called once (and only once) across all processes which have access
        to the shared memory block."""
        if self._name:
            if not iswindows:
                try:
                    _posixshmem.shm_unlink(self._name)
                except FileNotFoundError:
                    pass
            self._name = ''
예제 #7
0
 def destroy(self) -> None:
     if shared_memory._USE_POSIX:
         # We manually unlink to bypass all the "resource tracker"
         # nonsense meant for non-SC systems.
         shm_unlink(self._shm.name)