Repository navigation
#108: Channel(0) send() now blocks until a receiver takes the value - #113
Merged
EdmondDantes merged 1 commit intoMay 10, 2026
Merged
Conversation
The unbuffered slot used to act as a 1-message buffer: the first send deposited into rendezvous_value and returned without waiting, breaking the documented Go-style rendezvous semantics and the happens-before guarantee between sender and receiver. Fix in METHOD(send) cap=0 path: if no receiver is queued, block in waiting_senders until recv() takes the value and wakes us. When the slot-owner wakes after consumption, if both queues still have waiters wake the next sender so it refills the slot — this keeps the chain moving for N senders / M receivers without deadlock. sendAsync is unchanged (still non-blocking, deposits into the slot). Also: - Tests channel/003 and channel/011 updated to reflect proper rendezvous ordering (send completes only after recv takes the value). - Renamed fuzzy_tests/ to fuzzy-tests/ for path consistency; updated all harness files, generated tests, feature files, CI workflows and docs. - CHANGELOG: added Fixed/Changed entries for 0.7.0.
EdmondDantes
deleted the
108-channel0-send-returns-without-a-waiting-receiver
branch
May 10, 2026 17:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The unbuffered slot used to act as a 1-message buffer: the first send deposited into rendezvous_value and returned without waiting, breaking the documented Go-style rendezvous semantics and the happens-before guarantee between sender and receiver.
Fix in METHOD(send) cap=0 path: if no receiver is queued, block in waiting_senders until recv() takes the value and wakes us. When the slot-owner wakes after consumption, if both queues still have waiters wake the next sender so it refills the slot — this keeps the chain moving for N senders / M receivers without deadlock.
sendAsync is unchanged (still non-blocking, deposits into the slot).
Also: