Is it possible to make this module async ?
bruceauyeung opened this issue · 1 comments
bruceauyeung commented
This module utilizes ipcRenderer.sendSync
/ipcMain.on
to hand events.
Is it possible to refactor to ipcRenderer.invoke
/ipcMain.handle
to make this module async internally ?
If it's possible ,why not implement this module like i said ?
If i try to do this, any suggestions?
MarshallOfSound commented
This is not possible, this module does things like proxy property setters and getters. It would transform foo.property
into await foo.property
which is vaguely reasonable but there is no way to await
a setter. So you end up with race condition with foo.blah = 'a'; await foo.blah
🤷
TLDR: Not technically possible