Skip to content
Snippets Groups Projects
Commit 18c0bf1b authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

Merge branch 'master' into develop

parents 94ff2967 60490d6c
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,18 @@ cdef class TimeSeries:
chunk.switch_to_descriptor_based_access()
return 0
cpdef int enable_mmap(self) except -1:
"""
Switches to mmap-based file access method for the entire series,
and all chunks open inside.
"""
self.descriptor_based_access = False
cdef Chunk chunk
with self.lock, self.open_lock:
for chunk in self.open_chunks.values():
chunk.switch_to_mmap_based_access()
return 0
def __init__(self, path: str, name: str, use_descriptor_based_access: bool = False):
self.descriptor_based_access = use_descriptor_based_access
self.mpm = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment