Skip to content
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

Refactor Process teardown #2870

Merged
merged 7 commits into from
Apr 17, 2023
Merged

Conversation

sporksmith
Copy link
Contributor

@sporksmith sporksmith commented Apr 13, 2023

Refactors Process to remove more state variables and make process teardown easier to follow.

@github-actions github-actions bot added Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable labels Apr 13, 2023
@github-actions github-actions bot removed the Component: Documentation In-repository documentation, under docs/ label Apr 13, 2023
@sporksmith sporksmith changed the title Process refactor cleanup Refactor Process teardown Apr 13, 2023
src/main/host/thread.rs Outdated Show resolved Hide resolved
src/main/host/managed_thread.rs Outdated Show resolved Hide resolved
src/main/host/managed_thread.rs Outdated Show resolved Hide resolved
src/main/host/process.rs Outdated Show resolved Hide resolved
Now that we're directly notified of thread exit, we don't need to "poll"
thread liveness.
Pass "Process exited" event up call stack instead of reaching up object
hierarchy to mutate state.
Completely remove the Process::is_exiting field; we handle process exit
synchronously now, so don't need to have this extra state.
Pass this through the call stack instead of having it another state
variable.
@sporksmith sporksmith merged commit ad00406 into shadow:main Apr 17, 2023
21 checks passed
@sporksmith sporksmith deleted the process-refactor-cleanup branch April 17, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Main Composing the core Shadow executable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants