Why does my program freeze when using EdgeJs?

15 Views Asked by At

I've recently ran into some problems while trying to run a Node function, when trying to run the code below, my program just freezes.

{
    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();
        }
    }
}

I've confirmed that the program only freezes when the await is executed, so that's the root of the problem, I'm probably "waiting" infinitely.

The only thing I receive in the debug console is the following:

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

Which I have no idea what it means, any help?

0

There are 0 best solutions below