[pypy-commit] cffi thread-safe: Add the basic file exporting locks
arigo
noreply at buildbot.pypy.org
Sat Nov 9 14:41:19 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: thread-safe
Changeset: r1400:3a2e2d0033c2
Date: 2013-11-09 14:01 +0100
http://bitbucket.org/cffi/cffi/changeset/3a2e2d0033c2/
Log: Add the basic file exporting locks
diff --git a/cffi/lock.py b/cffi/lock.py
new file mode 100644
--- /dev/null
+++ b/cffi/lock.py
@@ -0,0 +1,12 @@
+import sys
+
+if sys.version_info < (3,):
+ try:
+ from thread import allocate_lock
+ except ImportError:
+ from dummy_thread import allocate_lock
+else:
+ try:
+ from _thread import allocate_lock
+ except ImportError:
+ from _dummy_thread import allocate_lock
More information about the pypy-commit
mailing list