How do I run a task in the background? #3093
Unanswered
ConsoleC137
asked this question in
Q&A
Replies: 1 comment
-
|
I am new to Yew and while looking around on how to solve a different problem I came across an article and application which uses a Yew agent and a web worker. I believe in that application the agent/worker helps keep the main Yew thread responsive. Perhaps an agent/worker could help with your image calculation? |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I am writing a small web application. This example is taken as a basis. My application takes images, turns them into black and white by pressing a button, and then initiates the download of the converted images. However, when calculations occur, the page freezes. I tried using yew::platform::spawn_local, but it didn't help in any way.
Button code:
<button onclick={ ctx.link().callback(|_| Msg::Clicked) }>{"Convert"}</button>Image Conversion code:
Beta Was this translation helpful? Give feedback.
All reactions