Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraneous threads left around #959

Open
sergio-costas opened this issue Jul 11, 2022 · 3 comments
Open

Extraneous threads left around #959

sergio-costas opened this issue Jul 11, 2022 · 3 comments
Labels

Comments

@sergio-costas
Copy link

sergio-costas commented Jul 11, 2022

Can you check/confirm that this bug has to do with Rayon? https://gitlab.gnome.org/GNOME/librsvg/-/issues/865

Thanks.

@cuviper
Copy link
Member

cuviper commented Jul 12, 2022

The global threadpool does keep idle threads around, by design. If you create your own ThreadPool, you can exert more control -- we don't have a synchronous shutdown (#688), but they will exit "soon" after the ThreadPool drops.

@hasezoey
Copy link

can the threadpool be closed manually with the default threadpool? because i had noticed that there are some extra threads where i wouldnt expect them to still be around GuillaumeGomez/sysinfo#927

@cuviper
Copy link
Member

cuviper commented Jan 31, 2023

No, the default global threadpool has no shutdown mechanism.

hasezoey added a commit to hasezoey/yt-downloader-rust that referenced this issue Jan 1, 2024
because it is only used once per command start (and only if command is "download")
which will leave rayon global threads hanging around which are never used again
(and the global thread pool cannot be closed)
see rayon-rs/rayon#959
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants