yue/node-gui

async tasks

Closed this issue · 1 comments

I'm trying to call some asynchronous task that perform some processing on user's actions. Since I don't want to block the UI I'm using node workers to invoke them. Unfortunately I see gui.MessageLoop.postTask don't work with async functions (or functions returning Promises in general).

Must tasks be synchronous to work ?

Does anybody found a way of invoking async functions from the UI thread. The only workaround I think could work is polling using gui.MessageLoop.postTask but that is non optimal and nasty solution. Thanks

This is related with yue/yue#38 and the solution as stated there is to use yode to run the app and not node directly. Will contribute with some notes in the readme, thanks