You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem seems to be that there are 3 competing event loops here: Node.js (libuv), Chrome, and V8 (for Promises).
In Node.js the Promise event loop is ran inside the libuv event loop, which means deasync runs everything when it runs the libuv loop.
And according to logic and this blogpost, in Electron the Chrome event loop is the main one, under it there is the V8 event loop and libuv event loop. Therefore running the libuv loop won't run promises.
This issue is different than #47#64#81#95 because deasync is working (e.g. with sleep), but not with promises or any DOM asynchronous stuff, because of the event loop problems mentioned above.
Current versions:
Electron 10.1.5
Node.js 12.16.3
V8 8.5.210.26
Chrome 85.0.4183.121
The text was updated successfully, but these errors were encountered:
NotWearingPants
changed the title
Not working in Electron
Not working with promises in Electron
Nov 15, 2020
Reproduction:
npm install deasync
The problem seems to be that there are 3 competing event loops here: Node.js (libuv), Chrome, and V8 (for Promises).
In Node.js the Promise event loop is ran inside the libuv event loop, which means
deasync
runs everything when it runs the libuv loop.And according to logic and this blogpost, in Electron the Chrome event loop is the main one, under it there is the V8 event loop and libuv event loop. Therefore running the libuv loop won't run promises.
This issue is different than #47 #64 #81 #95 because deasync is working (e.g. with sleep), but not with promises or any DOM asynchronous stuff, because of the event loop problems mentioned above.
Current versions:
Electron 10.1.5
Node.js 12.16.3
V8 8.5.210.26
Chrome 85.0.4183.121
The text was updated successfully, but these errors were encountered: