Skip to content

Confusing order of tuple returned by promise() #4

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

Closed
tomaka opened this issue Jun 30, 2016 · 1 comment
Closed

Confusing order of tuple returned by promise() #4

tomaka opened this issue Jun 30, 2016 · 1 comment

Comments

@tomaka
Copy link
Contributor

tomaka commented Jun 30, 2016

The promise function returns a tuple of (Promise, Complete).

The Promise object is similar to the Receiver object of the channels in the stdlib, while the Complete object is similar to the Sender object.

However in the stdlib, the channel() function returns a tuple of (Sender, Receiver).

I find it confusing that the order of what promise() returns is the opposite of what channel() returns.

@alexcrichton
Copy link
Member

Sounds reasonable to me!

withoutboats pushed a commit that referenced this issue Mar 25, 2018
exrook added a commit to exrook/futures-rs that referenced this issue Mar 31, 2021
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

No branches or pull requests

2 participants