Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mirror
sjrpc
Commits
9752c321
Commit
9752c321
authored
Jan 31, 2011
by
Antoine Millet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added "with" statement feature to the BytesBuffer (used to lock the buffer).
parent
52a7d9c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
sjrpc/utils/datastructures.py
sjrpc/utils/datastructures.py
+6
-0
No files found.
sjrpc/utils/datastructures.py
View file @
9752c321
...
...
@@ -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__
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment