Skip to content

Remove async from send_event#270

Merged
rustaceanrob merged 1 commit intomasterfrom
async-event-1-14
Jan 15, 2025
Merged

Remove async from send_event#270
rustaceanrob merged 1 commit intomasterfrom
async-event-1-14

Conversation

@rustaceanrob
Copy link
Collaborator

Dialog::send_event also makes use of the unbounded mpsc channels. From the docs:

This method is not marked async because sending a message to an unbounded channel never requires any form of waiting.

There is no need to wait for more room on the stack or heap because the unbounded channels don't have a designated memory space. The bounded channels have to wait for sending an item because there may or may not be space in the channel. Conceptually a "channel" is just a queue in memory with one type that may place things there and another that can take things.

Follows up to the previous send_warning refactor @nyonson

Copy link
Collaborator

@nyonson nyonson left a comment

Choose a reason for hiding this comment

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

ACK 7ea99c1

@rustaceanrob rustaceanrob merged commit 438cb8d into master Jan 15, 2025
14 checks passed
@rustaceanrob rustaceanrob deleted the async-event-1-14 branch January 15, 2025 18:37
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