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 dispatcher / add Receiver::recv #286

Merged
merged 5 commits into from
Feb 28, 2021
Merged

refactor dispatcher / add Receiver::recv #286

merged 5 commits into from
Feb 28, 2021

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Feb 24, 2021

PR Type

Refactor

PR Checklist

  • Added tests.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt

Overview

Reduce maintenance burden. Keep mpsc public since it is exposed in public API of Dispatcher.

Refactor a few things: see changelog.

@robjtede robjtede requested a review from fakeshadow February 24, 2021 11:27
@robjtede robjtede changed the title hide mpsc refactor dispatcher / add Receiver::recv Feb 24, 2021
@fakeshadow
Copy link
Contributor

LGTM.

I don't think async method is needed as it would always be used in a leaf future but it's Ok to have it.
I also find poll_fn kinda hacky but it's a nice util to have. I feel it would be better to construct a typed future for poll_fn like usage where the purpose is more clear reflexed by the type's name and code more readable.

@robjtede robjtede merged commit 382830a into master Feb 28, 2021
@robjtede robjtede deleted the priv-mpsc branch February 28, 2021 21:11
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.

2 participants