This shows how Tokio concurrency can be used inside Vizia.
Usually, Vizia expects you to create a new system thread every time you want to spawn a concurrent task (see
vizia::context::Context::spawn
).
System threads are usually heavier than async concurrency, especially with a high performance library like
Tokio, so it would be desirable to be able to use both.
Fortunately, by making main
into an async routine and running vizia's main event loop inside of it, it is