mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Merge 3.4
This commit is contained in:
commit
09db75fcd6
1 changed files with 4 additions and 2 deletions
|
@ -262,8 +262,10 @@ that only one process prints to standard output at a time::
|
|||
|
||||
def f(l, i):
|
||||
l.acquire()
|
||||
print('hello world', i)
|
||||
l.release()
|
||||
try:
|
||||
print('hello world', i)
|
||||
finally:
|
||||
l.release()
|
||||
|
||||
if __name__ == '__main__':
|
||||
lock = Lock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue