Skip to content

Commit

Permalink
Fix unchunk lazy-seq ordering bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-barrett committed May 25, 2014
1 parent 1d1988c commit 19c6c3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/clj/com/climate/claypoole/impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@
Based on http://stackoverflow.com/questions/3407876/how-do-i-avoid-clojures-chunking-behavior-for-lazy-seqs-that-i-want-to-short-ci"
[s]
(when-let [s (seq s)]
(cons (first s)
(lazy-seq (unchunk (rest s))))))
(lazy-seq
(when-let [s (seq s)]
(cons (first s)
(unchunk (rest s))))))

(defn threadpool
"Make a threadpool. It should be shutdown when no longer needed.
Expand Down

0 comments on commit 19c6c3a

Please sign in to comment.