Closed minikomi closed 5 years ago
I have a stream built up which I finally want to block on and consume as a sequence.
I tried using stream->seq but, without a timeout, it blocks indefinitely without returning:
stream->seq
(def st (s/stream)) (s/put-all! st (range 10)) (s/stream->seq st)
Compared to:
(def st (s/stream)) (s/put-all! st (range 10)) (s/stream->seq st 0)
which returns instantly.
Alternatively, is there a way to block and consume a stream until all values have passed through?
I have a stream built up which I finally want to block on and consume as a sequence.
I tried using
stream->seq
but, without a timeout, it blocks indefinitely without returning:Compared to:
which returns instantly.
Alternatively, is there a way to block and consume a stream until all values have passed through?