Skip to content

close all workers when process is done#661

Open
jonSeetrue wants to merge 1 commit into
Kitware:masterfrom
jonSeetrue:fix_memory_issues
Open

close all workers when process is done#661
jonSeetrue wants to merge 1 commit into
Kitware:masterfrom
jonSeetrue:fix_memory_issues

Conversation

@jonSeetrue

Copy link
Copy Markdown

Fix the memory leak issue.
close all workers when done processing.

@jonSeetrue

Copy link
Copy Markdown
Author

Hi @banesullivan
This pr fixes the memory issues of the open workers, could you review it, please?

@banesullivan

Copy link
Copy Markdown

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 thewtex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@jonSeetrue

Copy link
Copy Markdown
Author

@thewtex do you mean to collect all the workers into an array on the viewer object and when loading a new image call terminateWorkers()?

@thewtex

thewtex commented Mar 22, 2023

Copy link
Copy Markdown
Contributor

@jonSeetrue a cleanup() function on the viewer that calls terminateWorkers() on the worker pools when called. Loading a new image will not need a call. I am not sure if an array on the viewer object is needed.

@jonSeetrue

Copy link
Copy Markdown
Author

@thewtex the worker-pool is not exported, so should the cleanup() function be part of each worker-pool implementation?

@thewtex

thewtex commented Mar 22, 2023

Copy link
Copy Markdown
Contributor

@jonSeetrue yes, that could work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants