TomasMikula / libretto

Declarative concurrency and stream processing library for Scala
Mozilla Public License 2.0
196 stars 6 forks source link

Fix resource leaks of the Future-based implementation #71

Closed TomasMikula closed 1 year ago

TomasMikula commented 2 years ago

Fix the resource leak related to long chains of promises (as described in #46) in Future-based implementation.

The problem is likely fixable by adding an extra level of indirection.

Add tests that check that the number of allocated promises remains constant for several use cases. (Depends on #70.)

TomasMikula commented 1 year ago

On closer look, there might not be a leak in the Future-based implementation. The use of Future#onComplete is scarce, and only in places where either