Skip to content

Commit

Permalink
Disable PythonEngine Shutdown to prevent deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
mohdali committed Dec 29, 2023
1 parent 3acd7f7 commit cb4dfea
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,5 @@ public Task StartAsync(CancellationToken cancellationToken)
}

/// <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;
}

0 comments on commit cb4dfea

Please sign in to comment.