Преглед на файлове

Make use of a more elegant interface to threading in Python3

Yentl Van Tendeloo преди 7 години
родител
ревизия
eb263e072d
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      src/python_sccd/python_sccd_runtime/statecharts_core.py

+ 3 - 2
src/python_sccd/python_sccd_runtime/statecharts_core.py

@@ -8,9 +8,10 @@ import threading
 import sys
 
 try:
-    import _thread as thread
-except ImportError:
     import thread
+except ImportError:
+    import threading as thread
+
 import traceback
 import math
 from heapq import heappush, heappop, heapify