Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bindings/python: explicitly clear futures
Problem: job.submit() and job.wait() both seem to leak futures. The futures in these "synchronous" methods go out of scope and thus should be automatically destroyed, but due to a circular reference alluded to by @SteVwonder in #2549, they persist. As a workaround, explicitly call _clear() on the futures in these methods. Credit goes to @andre-merzky for proposing the first version of this patch in #2553, based on a suggestion by @grondo, with changes proposed by @SteVwonder. Group effort! Fixes #2549.
- Loading branch information