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

feat: add new_biased constructor for biased channel selection #1150

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

JabobKrauskopf
Copy link
Contributor

@JabobKrauskopf JabobKrauskopf commented Nov 26, 2024

I added a new with_bias constructor to the Select struct to allow for selecting channels with a bias.

This should make it possible to use a biased select without the select_biased! macro.

Looking for feedback on naming or if I missed "implementing" something

CC #1145

Edit:

The with_bias function was renamed to new_biased

Closes #1145

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks. As for naming, I think new_biased is a better name here. (consistent with select vs select_biased)

crossbeam-channel/src/select.rs Show resolved Hide resolved
@JabobKrauskopf JabobKrauskopf changed the title feat: add with_bias constructor for biased channel selection feat: add new_biased constructor for biased channel selection Dec 4, 2024
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

LGTM

@taiki-e taiki-e merged commit 58faff9 into crossbeam-rs:master Dec 8, 2024
24 checks passed
@taiki-e
Copy link
Member

taiki-e commented Dec 15, 2024

Published in crossbeam-channel 0.5.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Non-macro biased Select?
2 participants