为什么我的程序在使用 EdgeJs 时会死机?

问题描述

我最近在尝试运行 Node 函数时遇到了一些问题,当我尝试运行下面的代码时,我的程序就死机了。

{
    class Interpreter
    {
        public static async Task NodeFunc()
        {
            var func = Edge.Func(@"
            return function (data,callback) {
                callback(null,'Node.js welcomes ' + data);
            }
        ");

            Console.WriteLine(await func(".NET"));
        }

        public static void chamar()
        {
            NodeFunc().Wait();
        }
    }
}

我已经确认程序只在执行 await 时冻结,所以这就是问题的根源,我可能在无限地“等待”。

我在调试控制台中收到的唯一内容如下:

The thread 0x41f8 has exited with code 0 (0x0).
The thread 0x52a0 has exited with code 0 (0x0).

我不知道这是什么意思,有什么帮助吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)