-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async functionality not working -- everything runs sync #97
Comments
I can't comment on whether or not sync is actually working, but I had to fork a process and run edge in the forked process to get it to be async. When I ran edge from the main electron process it locked up the app. It would be nice to figure out if that is the expected standard procedure or if there is an issue with edge. |
This is not an issue with edge-js but rather with Electron when module is running on main Electron process. Take a look at related issue below, this comment explains the problem in depth paranext/paranext#9 (comment) |
Thanks for the pro tip @togradywk -- on my end, I've gone ahead and forked the process, and written logic to control edge.js via the fork <3 This should still really be fixed, but it no longer bothers me if it is or not |
As an example for someone facing this issue I'll show what worked for me: In my case I was trying to open a pptx file asynchronously so, I used the module office-script which is based on edge-js, So first I replaced edje-js to electron-edje-js in the module, Next, to call my pptx file: main.js: child.js: powerpoint.open(path.join( |
The C# code is not run async, it is running sync.
Sample code:
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?
The text was updated successfully, but these errors were encountered: