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
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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__()