c# - 停止 IronPython 中运行的所有线程

标签 c# ironpython

如果我在 C# 线程中启动 IronPython 引擎,python 脚本将启动多个线程。但是,当我终止 C# 线程时,python 脚本中的所有线程仍在运行。如何杀死 Python 脚本中的所有线程?

最佳答案

简单的想法是将其作为进程启动,

在您终止进程后,它的每个线程也将被终止。

关于c# - 停止 IronPython 中运行的所有线程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16930978/

相关文章:

ironpython - IronPython中的C#“using” block 等效于什么?

c# - 如何按 IEnumerable 属性值分组

c# - Javascript 舍入 v C# 舍入

c# - ILGenerator.DeclareLocal() 采用尚未编译的类的类型

python - 创建一个修改了一个元素的新元组

c# - 使用 IronPython 扩展 ASP.Net MVC 网站

c# - 在 Entity Framework 中添加具有多对多关系的项目

c# - Base64UrlEncode 的使用语句

python - 正态分布;铁蟒

python - 我如何在 IronPython 中打印脚本行号?