Fork me on GitHub
#core-async
<
2017-11-02
>
val_waeselynck14:11:08

It seems onto-chan retains the head of lazy sequences (at least in Clojure JVM), which can cause memory leaks for large sequences:

;; throws an OOM
(a/onto-chan 
  (a/chan (a/dropping-buffer 1))
  (repeatedly #(byte-array 10000)))

val_waeselynck14:11:15

This is in [org.clojure/core.async "0.3.443"] in Clojure JVM 1.8.0

val_waeselynck14:11:23

Should I file a bug?

schmee14:11:36

seems like it should be fixed in master at least: https://dev.clojure.org/jira/browse/ASYNC-138

val_waeselynck14:11:16

@schmee That change has already been merged in my current core-async version (which is the latest)

schmee14:11:53

hmm, then I guess that would be a new issue

val_waeselynck14:11:59

@schmee it's weird, seems the patch proposed in ASYNC-32 hasn't been merged

schmee14:11:19

it was supposed to be superseded by the one in ASYNC-138

schmee14:11:45

maybe the best option is to post a comment of that issue with the failing example?

val_waeselynck15:11:00

@schmee I guess so, will do, thanks!