bohonghuang / cl-gtk4

GTK4/Libadwaita/WebKit2 bindings for Common Lisp.
GNU Lesser General Public License v3.0
215 stars 9 forks source link

Request for Extra Example: Using Async #23

Open rationalis-petra opened 1 year ago

rationalis-petra commented 1 year ago

As it says in the title: could you please add an example for using Asynchronous programming. I'm particularly interested in using GAsyncReadyCallback as it's required as an input to some functions (like the file dialogs).

Thanks!

rationalis-petra commented 1 year ago

Should I take the enhancement label to mean that this is currently not doable? Or is it possible but just bad/unergonomic?

bohonghuang commented 1 year ago

Should I take the enhancement label to mean that this is currently not doable? Or is it possible but just bad/unergonomic?

It's possible. In fact, I want to combine it with async/await (using the optimized cl-cont for CPS transformation), but I currently lack the time to delve into it. I have already developed cl-cont-optimizer and have added support for async/await to promise. If you're interested, you can take a look and see if it can be combined with GIO's event loop.