Skip to content

Make channel constructor private, add explicit factory methods#95

Merged
adamw merged 1 commit intomainfrom
explicit-buffer-factories
Feb 4, 2025
Merged

Make channel constructor private, add explicit factory methods#95
adamw merged 1 commit intomainfrom
explicit-buffer-factories

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