Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1d7be9

Browse files
Create re_entrant_locks.py
1 parent 06ed71f commit b1d7be9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎scripts/re_entrant_locks.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import threading
2+
3+
lock = threading.Lock()
4+
5+
print 'First try :', lock.acquire()
6+
print 'Second try:', lock.acquire(0)
7+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /