开发者

Difference when executing IPy Script embedded or "stand-alone"?

开发者 https://www.devze.com 2023-04-03 05:27 出处:网络
as already written in my other post, I\'m currently writing an IDE/Debugger for IronPython. But now I came across another problem.

as already written in my other post, I'm currently writing an IDE/Debugger for IronPython.

But now I came across another problem.

I have libraries written in C#, which I call from my IronPython script.

When I now run the script in the console via "ipy.exe myScript.py" it works perfectly. But when I run it the following way I have problems with Threads in my C# libraries.

开发者_C百科_pyEngine = Python.CreateEngine();
_pyScope = _pyEngine.CreateScope();
_pyEngine.ExecuteFile("myScript.py", _pyScope);

At least I think it is a problem with Threads, since I wait for an answer from another hw in a thread, while another Thread is blocked by a ManualResetEvent with a timeout. But instead of Setting the Event the Timeout Method is called, when running the script in embedded mode.

Does anyone have an idea what this might come from?

0

精彩评论

暂无评论...
验证码 换一张
取 消