-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: fixed windows disk package leaks #1501
Conversation
ozanh
commented
Aug 10, 2023
- fixed goroutine leak in PartitionsWithContext
- closed registry handle in init
- fixed goroutine leak in PartitionsWithContext - closed registry handle in init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
Let me check the intent of this PR: is the intent to change the quitChan
to wait for the quitChan
to close on defer with select in order to prevent goroutine leaks?
If so, then indeed the goroutine continues to remain in the current implementation, and this PR seems to solve that.
Hi @shirou It could be resolved using a buffered channel as well however my fix seemed to be an idiomatic approach with channels. Lastly, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your explanation. I understood your intention and I agree with you. Thank you very much.
As for the all
argument, we don't use it in the Windows implementation, but we use it on other platforms such as Linux.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) | require | patch | `v3.23.7` -> `v3.23.8` | --- ### Release Notes <details> <summary>shirou/gopsutil (github.com/shirou/gopsutil/v3)</summary> ### [`v3.23.8`](https://github.com/shirou/gopsutil/releases/tag/v3.23.8) [Compare Source](https://github.com/shirou/gopsutil/compare/v3.23.7...v3.23.8) <!-- Release notes generated using configuration in .github/release.yml at v3.23.8 --> #### What's Changed [#​1514](https://github.com/shirou/gopsutil/issues/1514) improves `Processes()` performance 6% or more. Thank you [@​atoulme](https://github.com/atoulme) ! ##### cpu - Enable setting of vendor and related information for all Power versions by [@​kishen-v](https://github.com/kishen-v) in [https://github.com/shirou/gopsutil/pull/1495](https://github.com/shirou/gopsutil/pull/1495) - chore: change CIRCLECI environment variable to CI. by [@​shirou](https://github.com/shirou) in [https://github.com/shirou/gopsutil/pull/1518](https://github.com/shirou/gopsutil/pull/1518) ##### disk - fix: fixed windows disk package leaks by [@​ozanh](https://github.com/ozanh) in [https://github.com/shirou/gopsutil/pull/1501](https://github.com/shirou/gopsutil/pull/1501) - fix IOCounters() SerialNumber enumeration by [@​gdvalle](https://github.com/gdvalle) in [https://github.com/shirou/gopsutil/pull/1508](https://github.com/shirou/gopsutil/pull/1508) ##### host - \[host]\[linux]: remove double quote from lsb release info by [@​shirou](https://github.com/shirou) in [https://github.com/shirou/gopsutil/pull/1504](https://github.com/shirou/gopsutil/pull/1504) ##### mem - mem: linux: fix vmstat field names by [@​chouquette](https://github.com/chouquette) in [https://github.com/shirou/gopsutil/pull/1498](https://github.com/shirou/gopsutil/pull/1498) ##### process - Fix Processes() calls with many cores by [@​atoulme](https://github.com/atoulme) in [https://github.com/shirou/gopsutil/pull/1514](https://github.com/shirou/gopsutil/pull/1514) #### New Contributors - [@​kishen-v](https://github.com/kishen-v) made their first contribution in [https://github.com/shirou/gopsutil/pull/1495](https://github.com/shirou/gopsutil/pull/1495) - [@​chouquette](https://github.com/chouquette) made their first contribution in [https://github.com/shirou/gopsutil/pull/1498](https://github.com/shirou/gopsutil/pull/1498) - [@​ozanh](https://github.com/ozanh) made their first contribution in [https://github.com/shirou/gopsutil/pull/1501](https://github.com/shirou/gopsutil/pull/1501) - [@​gdvalle](https://github.com/gdvalle) made their first contribution in [https://github.com/shirou/gopsutil/pull/1508](https://github.com/shirou/gopsutil/pull/1508) **Full Changelog**: shirou/gopsutil@v3.23.7...v3.23.8 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/go-skynet/LocalAI). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi42OC4xIiwidXBkYXRlZEluVmVyIjoiMzYuNjguMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>