Fix for worker thread spawning of python
This commit is contained in:
@@ -16,6 +16,9 @@ namespace PythonInterop {
|
|||||||
|
|
||||||
// Initiilize python
|
// Initiilize python
|
||||||
PythonEngine.Initialize();
|
PythonEngine.Initialize();
|
||||||
|
|
||||||
|
// Needed because C# calls the python from each connections worker thread
|
||||||
|
PythonEngine.BeginAllowThreads();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is thread blocking, runs on the main thread, and takes multiple minutes so probabaly need to run on a background thread at some point
|
// This is thread blocking, runs on the main thread, and takes multiple minutes so probabaly need to run on a background thread at some point
|
||||||
|
|||||||
Reference in New Issue
Block a user