close all workers when process is done#661
Conversation
|
Hi @banesullivan |
|
Hi @jonSeetrue, I'm not an active developer or maintainer of this software nor am I familiar with the exact issue referred to here, so I don't think I'm the right person to review this. Though, as a member of the user community, I think I can speak for everyone in saying thank you for this contribution and likely impactful fix! |
thewtex
left a comment
There was a problem hiding this comment.
@jonSeetrue yes, thank you for the contribution!
Can you please call terminateWorkers() from a cleanup() function on the viewer object? For performance, we want to re-use the workers on repeated calls.
|
@thewtex do you mean to collect all the workers into an array on the viewer object and when loading a new image call terminateWorkers()? |
|
@jonSeetrue a |
|
@thewtex the worker-pool is not exported, so should the cleanup() function be part of each worker-pool implementation? |
|
@jonSeetrue yes, that could work 👍 |
Fix the memory leak issue.
close all workers when done processing.