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

Add BoundedSourceQueue.isQueueCompleted to check is the queue is completed before offering? #31608

Open
He-Pin opened this issue Sep 19, 2022 · 1 comment
Labels
0 - new Ticket is unclear on it's purpose or if it is valid or not t:stream

Comments

@He-Pin
Copy link
Member

He-Pin commented Sep 19, 2022

How about add a method BoundedSourceQueue.isQueueCompleted to check if the queue is already completed , so we can check before offer a message to it?

@johanandren
Copy link
Member

The impl has an atomicref so would be easy to implement but since it is concurrent there is still a race between checking and posting, so better offer and act if it failed which is an atomic result?

@johanandren johanandren added 0 - new Ticket is unclear on it's purpose or if it is valid or not t:stream labels Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new Ticket is unclear on it's purpose or if it is valid or not t:stream
Projects
None yet
Development

No branches or pull requests

2 participants