diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-26 15:56:50 +0100 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-26 15:56:50 +0100 |
| commit | 31324467736c9a0fc63f47f11c6810dee23f05e2 (patch) | |
| tree | 3d5d63c7e042cefaf330eb10fa4b98c21c48a9aa /docs | |
| parent | 9f14dd4d7c0cce154c5b13728d69a77c58103c44 (diff) | |
| download | psutil-31324467736c9a0fc63f47f11c6810dee23f05e2.tar.gz | |
fix #1437: return pids() in sorted order
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/index.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst index 8983e880..a6f2ba73 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -817,13 +817,17 @@ Functions .. function:: pids() - Return a list of current running PIDs. To iterate over all processes - and avoid race conditions :func:`process_iter()` should be preferred. + Return a sorted list of current running PIDs. + To iterate over all processes and avoid race conditions :func:`process_iter()` + should be preferred. >>> import psutil >>> psutil.pids() [1, 2, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, ..., 32498] + .. versionchanged:: + 5.6.0 PIDs are returned in sorted order + .. function:: process_iter(attrs=None, ad_value=None) Return an iterator yielding a :class:`Process` class instance for all running |
