Closed
Description
The C# code is not run async, it is running sync.
Sample code:
const edge = require('electron-edge-js');
let someCommand = edge.func(`
async (input) => {
while(true){}
return ".NET Welcomes " + input.ToString();
}
`)
console.log('a');
someCommand('javascript', function() {
console.log('c');
});
console.log('b');
I see "a" in the console, and then the entire app freezes due to the infinite loop within the C# code. According to the documentation, the C# code is meant to run async, meaning that it can be as CPU intense as it likes, take as long as it likes, and the JavaScript v8 engine code will continue to run.
I have also tried specifying "sync: false" specifically and even "sync: true", this didn't help.
How do I make the C# code run async?
Metadata
Metadata
Assignees
Labels
No labels