...
This commit is contained in:
parent
fd0262413e
commit
a1e4b19486
10
kitty/shm.py
10
kitty/shm.py
@ -63,10 +63,20 @@ class SharedMemory:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def __enter__(self) -> 'SharedMemory':
|
||||
return self
|
||||
|
||||
def __exit__(self, *a: object) -> None:
|
||||
self.close()
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def fileno(self) -> int:
|
||||
return self._fd
|
||||
|
||||
@property
|
||||
def buf(self) -> memoryview:
|
||||
ans = self._buf
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user