Disable PythonEngine Shutdown to prevent deadlock
This commit is contained in:
parent
3acd7f7c1e
commit
cb4dfea8d3
|
|
@ -44,13 +44,5 @@ public class PythonGlobalInterpreterManager : IHostedService
|
|||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
if(_mainThreadState != IntPtr.Zero)
|
||||
{
|
||||
PythonEngine.EndAllowThreads(_mainThreadState);
|
||||
PythonEngine.Shutdown();
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
|
||||
}
|
||||
Loading…
Reference in a new issue