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

Make channel constructor private, add explicit factory methods #95

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

adamw
Copy link
Member

@adamw adamw commented Feb 4, 2025

The motivation is to make it crystal clear what kind of buffer the channel is using. The previous new Channel() which created a rendezvous channel might be misleading, as it in most cases rendezvous channels are not what you want, and are slower than buffered channels. The new design encourages usage of buffered-default channels.

@adamw adamw requested a review from emil-bar February 4, 2025 09:55
@adamw adamw merged commit 2abc811 into main Feb 4, 2025
2 checks passed
@adamw adamw deleted the explicit-buffer-factories branch February 4, 2025 10:30
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