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

Use AtomicWaker in mpsc #1317

Merged
merged 2 commits into from
Nov 10, 2018
Merged

Conversation

stepancheg
Copy link
Contributor

AFAIU AtomicWaker is a perfect candidate to use in mpsc receiver.

This patch is good because:

  • it enabled AtomicWaker dogfooding
  • it is a good example of AtomicWaker proper (I hope) usage
  • it kills overcomplicated logic of ReceiverTask

... so `AtomicWaker` could be used inside `futures-channel`.

`AtomicWaker` is still accessible to users only from `futures-util`.
@stepancheg stepancheg force-pushed the mpsc-atomic-waker branch 5 times, most recently from 22658fd to 3fb3baf Compare November 10, 2018 03:57
AFAIU AtomicWaker is a perfect candidate to use in mpsc receiver.

This patch is good because:
* it enabled `AtomicWaker` dogfooding
* it is a good example of `AtomicWaker` proper (I hope) usage
* it kills overcomplicated logic of `ReceiverTask`
@stepancheg
Copy link
Contributor Author

OK, finally after 10 iterations I managed to move AtomicWaker to futures-core.

@stepancheg
Copy link
Contributor Author

First commit moves AtomicWaker and second commit uses it in mpsc.

@cramertj
Copy link
Member

Heh, thanks! :)

@cramertj cramertj merged commit c774e54 into rust-lang:master Nov 10, 2018
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