Tokio Runtime and Tao EventLoop #1584
Unanswered
AriBermeki
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello dear Tauri team, 👋
First of all, thank you very much for your great work: Thanks to Tao and Wry, the underlying layers have become extremely powerful and flexible.
I would be very happy if you could add a minimal Rust example to the examples folder that demonstrates the following:
Initializing a Tokio runtime in parallel with Tao & Wry (analogous to tauri::async_runtime).
Providing asynchronous commands:
async fn set_window_title(title: String) – an asynchronous setter that saves the passed title or applies it directly.
async fn get_window_title() -> String – an asynchronous getter that returns the saved title.
As with Tauri, you should ensure that the messages are sent correctly to the Tao event loop without blocking the main thread, and that the responses are returned as expected.
I'm currently encountering a problem waiting for the response from the Tao loop: The call blocks the main thread instead of continuing asynchronously. Could you please show me how to design waiting loops in this example so that they don't block and still respond correctly to the Tao loop's responses?
Thank you for your support and effort!
Beta Was this translation helpful? Give feedback.
All reactions