We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 001d0f3 commit e5c22b8Copy full SHA for e5c22b8
tests/__init__.py
@@ -0,0 +1,26 @@
1
+compiling = False
2
+noticed = False
3
+notice_delay = 0.3
4
+import time
5
+import sys
6
+import threading
7
+from importlib.util import find_spec
8
+if find_spec("pyximport") and find_spec("cython"):
9
+ import pyximport; pyxloader = pyximport.install(pyimport=True, language_level=3)[1]
10
+
11
+def notice_job():
12
+ global noticed
13
+ started = time.time()
14
+ while compiling:
15
+ if time.time() > started+notice_delay and compiling:
16
+ noticed = True
17
+ print("Compiling RNS object code... ", end="")
18
+ sys.stdout.flush()
19
+ break
20
+ time.sleep(0.1)
21
22
23
+compiling = True
24
+threading.Thread(target=notice_job, daemon=True).start()
25
+import RNS; compiling = False
26
+if noticed: print("Done."); sys.stdout.flush()
0 commit comments