clj-commons/claypoole

Readahead memory leak

leon-barrett opened this issue · 0 comments

Given a lot of lazy input and a slow function, pmap produces a memory leak.

The issue is that pmap uses a thread to put work into the threadpool, and that thread is not bounded by anything. If it goes faster than the work in the pool, it can realize lots of (potentially lazy) input, acting as a memory leak.