-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: Add start_updater_thread to update off the main thread #11
Conversation
This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent.
/// cache. The Engine calls this during boot and it will check for an update | ||
/// and install it if available. | ||
pub fn start_update_thread() { | ||
// This holds the lock on the config for the entire duration of the update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any harm in holding the lock on the config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is, in that any other calls into the library will block until the lock is released. Which means that if we add a dart api those calls would hang while an update is in progress. Better is to have it drop the lock while it's doing network requests since those can go on for a long time.
This makes it so that clients can easily not block when wanting to queue an update. I have a separate patch which updates the Engine to use this new API. I also needed to split the concept of the "next_boot" patch from the "current_boot" patch, previously refered to as "current" or "active" patch. This required adding a report_launch_start api to let the updater library know when to set current_boot patch from next_boot. I also removed the rust updater/cli in this as well as the vmpath argument to init. I also exposed the report_launch_success api, but its not yet used by the Engine. I renamed report_failed_launch to report_launch_failure to match report_launch_start which I introduced.
Also added a helper for char* allocation (not sure if it's better).
Remove space Co-authored-by: Felix Angelov <felix@shorebird.dev>
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
* feat: Support async updates from the updater library. This is the engine side of: shorebirdtech/updater#11 I also removed passing vmpath (unused) and adjusted names to be more consistent. * Add DEPS change
This makes it so that clients can easily not block when wanting to
queue an update.
I have a separate patch which updates the Engine to use this new
API.
I also needed to split the concept of the "next_boot" patch
from the "current_boot" patch, previously refered to as
"current" or "active" patch. This required adding a
report_launch_start api to let the updater library know
when to set current_boot patch from next_boot.
I also removed the rust updater/cli in this as well as the
vmpath argument to init.
I also exposed the report_launch_success api, but its not yet
used by the Engine.
I renamed report_failed_launch to report_launch_failure to match
report_launch_start which I introduced.