summaryrefslogtreecommitdiff
path: root/src/M2Crypto/threading.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2021-01-13 11:47:29 +0100
committerMatěj Cepl <mcepl@cepl.eu>2021-01-14 14:29:59 +0100
commit9178c4d56b7270a6b813995f55a4828ce96256d8 (patch)
treeac6a539983294f42cc2b97d404f95912d2c7a8fe /src/M2Crypto/threading.py
parentd93ee3c676929ae1ca9b3acb94a8ce9c3f9c936d (diff)
downloadm2crypto-9178c4d56b7270a6b813995f55a4828ce96256d8.tar.gz
Move project to src/ layout
Diffstat (limited to 'src/M2Crypto/threading.py')
-rw-r--r--src/M2Crypto/threading.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/M2Crypto/threading.py b/src/M2Crypto/threading.py
new file mode 100644
index 0000000..f9f2683
--- /dev/null
+++ b/src/M2Crypto/threading.py
@@ -0,0 +1,25 @@
+from __future__ import absolute_import
+
+"""
+M2Crypto threading support, required for multithreaded applications.
+
+Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved."""
+
+# M2Crypto
+from M2Crypto import m2
+
+
+def init():
+ # type: () -> None
+ """
+ Initialize threading support.
+ """
+ m2.threading_init()
+
+
+def cleanup():
+ # type: () -> None
+ """
+ End and cleanup threading support.
+ """
+ m2.threading_cleanup()