def close(self):
        """Close the mutex and release the handle."""
        if self.handle is None:
            # Already closed
            return
        ret = _CloseHandle(self.handle)
        if not ret:
            raise ctypes.WinError()
        self.handle = None
Close the mutex and release the handle.
recipes/Python/577794_Win32_named_mutex_class_systemwide/recipe-577794.py