Repository navigation
Conversation
Contributor
Package Changes Through dcb4824There are 4 changes which include shell with prerelease, shell-js with prerelease, store with prerelease, store-js with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v3 core has
on_cleanup_before_exitnow and its docs name this exact useit also runs on exit paths that skip
RunEvent::Exit, likeAppHandle::restarton the main threadshell and store still do their exit work on
RunEvent::Exit, so on such a restart shell children keep running and unsaved store values are lostfix
move both loops into
on_cleanup_before_exit, on a normal exit it runs right afterRunEvent::Exitand before the resource table is clearedthe store loop collects paths and rids first so it doesn't hold the stores lock while locking the table (the order #3746 fixes on v2)
tested on an app on tauri 3.0.0-alpha.5 + shell/store 3.0.0-alpha.3 from crates.io vs this branch
a sync command calls
app.restart()after the page spawnedsleep 317and setup put{"k":42}into a store with auto save offbefore: restart leaves the child running and never writes the store (2 of 2), normal exit is fine
after: child killed and store saved on both paths
tests/cleanup_close_race.rsrunscleanup_before_exitwhile another thread closes and reloads a store, with the loop just moved it hung 3 of 3, now ~0.6sclippy fmt and the shell and store tests pass, macos only