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

Minor Downstairs cleanup #1127

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Conversation

mkeeter
Copy link
Contributor

@mkeeter mkeeter commented Jan 30, 2024

  • tokio::sync::mpsc::Sender is Clone, so there's no need to wrap it in an Arc or Mutex
  • We only ever send one message on the terminate_sender queue, so use a tokio::sync::oneshot
  • Since we now mix mpsc and oneshot, use qualified names for channel(..), Sender, and Receiver
  • Small style tweaks in downstairs/src/main.rs

Copy link
Contributor

@faithanalog faithanalog left a comment

Choose a reason for hiding this comment

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

makes sense to me

Copy link
Contributor

@leftwo leftwo left a comment

Choose a reason for hiding this comment

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

Yeah, looks good.

I was a little worried about the interactions between multiple upstairs connecting
at the same time, but the tests cover those cases so it should all be good there.

@mkeeter mkeeter merged commit 39d43a0 into oxidecomputer:main Feb 1, 2024
18 checks passed
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.

3 participants