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
BlockingQueueSource should be closable #176
Comments
EDIT 2023-2-28: Oops, slosing should prevent puts, not takes. Takes can happen until drained |
This doesn't seem to be a particular issue with (defn foo []
(let [a (s/stream 4)
b (s/batch 100 1 a)]
(s/put-all! a [1 2 3 4])
(s/close! a)
(println (s/description b)))) This produces exactly the same behavior, using a regular stream. However, by removing the |
There's a bit of a race condition here, though. Behind the scenes, multiple threads are being used, so it's completely possible for the description of b to be printed out before the closing of a has fully propagated its effects to b. I ran that code snippet multiple times, and got different results. In general, ordering around closing can get a little weird. Unfortunately, the current default |
I guess this is because the queue is not closable. Would be nice to have the downstreams disconnect in this case though.
The text was updated successfully, but these errors were encountered: