Skip to content
Snippets Groups Projects
Commit 9752c321 authored by Antoine Millet's avatar Antoine Millet
Browse files

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

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