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

feat: manual shutdown of client #4492

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

maan2003
Copy link
Member

@maan2003 maan2003 commented Mar 7, 2024

on top #4484

dpc
dpc previously approved these changes Mar 7, 2024
Copy link
Contributor

@dpc dpc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@maan2003 maan2003 marked this pull request as ready for review March 7, 2024 20:12
@maan2003 maan2003 requested review from a team as code owners March 7, 2024 20:12
@github-merge-queue github-merge-queue bot dismissed dpc’s stale review March 8, 2024 15:18

The merge-base changed after approval.

dpc
dpc previously approved these changes Mar 12, 2024
@maan2003 maan2003 dismissed dpc’s stale review March 12, 2024 02:15

The merge-base changed after approval.

@dpc
Copy link
Contributor

dpc commented Mar 12, 2024

Followup: #4535

fedimint_core::task::sleep(Duration::from_millis(10)).await;
/// Shutdown the client.
/// Returns false if there are other clones of [`ClientHandle`].
pub async fn shutdown(self) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should return a result...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe Result<(), ClientHandle>

Copy link
Contributor

@dpc dpc Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap.

BTW. That Client with stopped reactor is an extra flag and state, that I'm not sure if it's useful for anything ever. Maybe we should cut it. It's easier if "handle exist == it's running" always holds.

So maybe all you can do is "drop" (shutdown), or "restart"? And then shutting down would be infallable? @maan2003

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@maan2003 maan2003 force-pushed the push-nmnstlzvumtw branch 2 times, most recently from 85216a7 to 4fb5f1c Compare March 13, 2024 20:38
@maan2003 maan2003 enabled auto-merge March 13, 2024 20:53
@maan2003 maan2003 added this pull request to the merge queue Mar 15, 2024
Merged via the queue into fedimint:master with commit 1171de3 Mar 15, 2024
20 checks passed
@maan2003 maan2003 deleted the push-nmnstlzvumtw branch March 15, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants