mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-02-09 06:05:11 -05:00
fix: try close mmap (#12306)
This commit is contained in:
@@ -41,7 +41,9 @@ class DiskDevice(Compiled):
|
||||
if self.count == 0:
|
||||
if self.fd is not None:
|
||||
os.close(self.fd)
|
||||
if hasattr(self, "mem"): self.mem.close()
|
||||
if hasattr(self, "mem"):
|
||||
try: self.mem.close()
|
||||
except BufferError: pass
|
||||
self.size = None
|
||||
def _iouring_setup(self):
|
||||
DiskDevice._tried_io_uring_init = True
|
||||
|
||||
Reference in New Issue
Block a user