mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-28 12:21:55 +00:00
...
This commit is contained in:
parent
fd0262413e
commit
a1e4b19486
1 changed files with 10 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue