[ASYNC-35] Using onto-chan with nonending sequence causes non-gc-able, infinitely-looping go block Created: 12/Nov/13 Updated: 20/Apr/14 Resolved: 20/Apr/14
|Reporter:||Brian Lubeski||Assignee:||Rich Hickey|
The above code causes my CPU to run at around 95% until I kill the process. (NOTE: This eventually leads to an OutOfMemoryError – see
Here is what I think is happening: after closing the channel returned by to-chan, all subsequent puts to that channel by the to-chan go block succeed immediately without blocking. Because the to-chan go block never blocks on its drain channel, it runs continuously and can't be GC'd (if I understand things correctly).
|Comment by Leon Grapenthin [ 15/Nov/13 10:16 AM ]|
I'd expect the behavior. Neither can to-chan know that (range) returns an infinite sequence, nor can it know that it's output channel has been closed.
|Comment by Brian Lubeski [ 11/Feb/14 11:27 AM ]|
Resolved in 0.1.278.0-76b25b-alpha.