Commit 3b622389 by rfkelly0

give all FS subclasses a "close" method

parent a34a46b5
......@@ -154,11 +154,18 @@ class FS(object):
thread_synconize -- If True, a lock object will be created for the
object, otherwise a dummy lock will be used.
"""
self.closed = False
if thread_synchronize:
self._lock = threading.RLock()
else:
self._lock = DummyLock()
def __del__(self):
if not self.closed:
self.close()
def close(self):
self.closed = True
def __getstate__(self):
# Locks can't be pickled, so instead we just indicate the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment