Skip to content

Commit efe6dad

Browse files
committed
Improve comment about import statement pre-loading
1 parent ff9a195 commit efe6dad

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/appose/python_worker.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ def execute_script():
141141

142142
self._report_completion()
143143

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
144+
# HACK: Pre-load toplevel import statements before running the script
145+
# as a whole on its own Thread. Why? Because on Windows, some imports
146+
# (e.g. numpy) may lead to hangs if loaded from a separate thread.
147+
# See https://github.com/apposed/appose/issues/13.
147148
block = ast.parse(script, mode='exec')
148149
import_nodes = [
149150
node for node in block.body

0 commit comments

Comments
 (0)