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

Sending can yield the thread #96

Open
NathanRoyer opened this issue Jun 3, 2024 · 1 comment
Open

Sending can yield the thread #96

NathanRoyer opened this issue Jun 3, 2024 · 1 comment

Comments

@NathanRoyer
Copy link

When we call try_send on a sender, here's what I think is happening:

  • ConcurrentQueue::push is called here
  • If the queue is unbounded, Unbounded::push is called here
  • If the queue reached its current capacity, busy_wait is called here
  • Which either spins or yields the thread, as defined here

I find it weird that we end up yielding the thread in async code.
If this is expected, I think it should be documented.

@NathanRoyer
Copy link
Author

@notgull have you seen this and would you like me to work on a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant