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

Rename async_channel to sync_channel #1078

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

tsoutsman
Copy link
Member

Renames the current async_channel to sync_channel.

Signed-off-by: Klimenty Tsoutsman klim@tsoutsman.com

Renames the current `async_channel` to `sync_channel`.

Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
Copy link
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

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

Thanks, lgtm!

@kevinaboos kevinaboos changed the title Add async/await channel Rename async_channel to sync_channel Dec 5, 2023
@kevinaboos kevinaboos merged commit 92295d7 into theseus-os:theseus_main Dec 5, 2023
3 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 5, 2023
The previous `async_channel` was asynchronous in the sense
that it had an internal buffer that allowed a sender and receiver
to not have to synchronously rendezvous in order to exchange
a message/data. However, it was not asynchronous in the sense
of language-level async/await, so the naming would be confusing.

We rename that channel implementation to `sync_channel`,
which is more accurate in the sense that Senders and Receivers
interact with it synchronously (not using async/await), which means
the current task may be blocked when waiting on a send or receive
operation.

This is in preparation for an upcoming PR that will introduce a channel
that supports language-level async/await syntax.

Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com> 92295d7
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