Open piegamesde opened 2 years ago
I think you can just copy-paste it to your project and adjust it. Most of the Actix things I use there have direct Tokio equivalent - except these two lines in close_actix_runtime()
:
actix::System::current().stop();
Ok(woab_runtime.actix_system_runner.run())
Both of them are for stopping the Actix actors though (I think - haven't touched this in a loooong time...) so I don't think you'll even need this function.
Thanks, I'll try that. (Also, I should have opened a discussion, can you move issues afterwards?)
So I've switched to vanilla Gtk4 and I'm mostly fine, however in async contexts I'd really like to do Tokio related stuff. If I understand correctly, https://github.com/idanarye/woab/blob/master/src/event_loops_bridge.rs did pretty much that in woab, but through the Actix API (I assume that it is just an abstraction over Tokio here). Would it be possible to extract only that part and make it only depend on Tokio, so that it may be used in Gtk 4 projects?