We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff9a195 commit efe6dadCopy full SHA for efe6dad
src/appose/python_worker.py
@@ -141,9 +141,10 @@ def execute_script():
141
142
self._report_completion()
143
144
- # pre-load imports in before starting a new separate Thread.
145
- # in windows some imports (e.g. numpy) lead to the script
146
- # get stuck if loaded in separate thread
+ # HACK: Pre-load toplevel import statements before running the script
+ # as a whole on its own Thread. Why? Because on Windows, some imports
+ # (e.g. numpy) may lead to hangs if loaded from a separate thread.
147
+ # See https://github.com/apposed/appose/issues/13.
148
block = ast.parse(script, mode='exec')
149
import_nodes = [
150
node for node in block.body
0 commit comments