Skip to content

Rendezvous stream for synchronous channel messaging #8908

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
wants to merge 1 commit into from

Conversation

tikue
Copy link
Contributor

@tikue tikue commented Sep 1, 2013

SyncChan blocks after sending a message until the SyncPort acknowledges receipt of the message.

}

/// Creates a stream whose channel, upon sending a message, blocks until the message is received.
pub fn rendezvous<T: Send>() -> (SyncPort<T>, SyncChan<T>) {
Copy link
Member

Choose a reason for hiding this comment

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

rendezvous is nice, but it seems peculiar to mismatch the names of the types of the port/chan. Maybe it could be sync_stream?

Copy link
Contributor

Choose a reason for hiding this comment

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

I recommended the name rendezvous because it comes from a plan 9 synchronization primitive that does exactly the same thing. Plus (imo) it does suggest the functionality, as the sender and receiver are "rendezvousing" on the sent data.

Copy link
Member

Choose a reason for hiding this comment

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

(it's also the name of the ada primitive which also does the same thing)

Copy link
Member

Choose a reason for hiding this comment

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

Ok; rendezvous is fine by me, I was just curious about the mismatch.

@tikue
Copy link
Contributor Author

tikue commented Sep 11, 2013

Ready for retry @anasazi

@tikue
Copy link
Contributor Author

tikue commented Sep 12, 2013

a test unrelated to my PR failed. retry? @anasazi

@anasazi
Copy link
Contributor

anasazi commented Sep 12, 2013

yep. bsd is rather unstable at the moment.

bors added a commit that referenced this pull request Sep 12, 2013
SyncChan blocks after sending a message until the SyncPort acknowledges receipt of the message.
@bors bors closed this Sep 12, 2013
@anasazi
Copy link
Contributor

anasazi commented Sep 12, 2013

Finally.

@tikue
Copy link
Contributor Author

tikue commented Sep 12, 2013

You guys rock.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 4, 2022
Make docs more consistent

changelog: none

This just fixes some docs to make them more consistent. I mostly just changed `// Good`, `// Bad`, etc to `Use instead:`.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 16, 2022
Improve lint doc consistency

changelog: none

This is a continuation of rust-lang#8908.

Notable changes:
- Removed empty `Known Problems` sections
- Removed "Good"/"Bad" language (replaced with "Use instead")
- Removed (and added some 😄) duplication
- Ignored the [`create_dir`] example so it doesn't create `clippy_lints/foo` 😄
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.

7 participants