瀏覽代碼

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