-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suit: start worker thread on demand, make suit_handle_url() public #18551
Conversation
10f2fef
to
15a43f2
Compare
How about using an event thread instead, which could also be reused for other stuff? |
My only concern there is that events are usually short tasks - if we'd use the event thread for installing the update, that would block other events for a long time. I'm not sure if anything on the system level relies on the event thread though, so this would then only block user applications which is probably fine. The main idea behind this is that we now export |
Hm, that's one thing I like about the extra thread, that updating doesn't stop the application. |
Well with this the user can just call So I think we don't have to mandate the event thread for this. |
@maribu thank you! |
Contribution description
Drop the need to call
suit_worker_run()
before callingsuit_worker_trigger()
- the thread only has a single purpose anyway.Also make the
suit_handle_url()
function available to users who already have a sufficiently large stack, when no worker thread should be started at all.Testing procedure
Follow the steps in
examples/suit_update
:Issues/PRs references