Commit 9752c321 authored by Antoine Millet's avatar Antoine Millet

Added "with" statement feature to the BytesBuffer (used to lock the buffer).

parent 52a7d9c1
...@@ -63,3 +63,9 @@ class BytesBuffer(object): ...@@ -63,3 +63,9 @@ class BytesBuffer(object):
''' '''
return len(self._buf) return len(self._buf)
def __enter__(self):
return self._lock.__enter__()
def __exit__(self):
return self._lock.__exit__()
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