Skip to content

Commit

Permalink
revert process_iter() exactly how it was pre #1667
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Feb 18, 2020
1 parent c9fc4fd commit 41fcba5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docs/DEVNOTES
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ BUGFIXES

- #600: windows / open_files(): support network file handles.

REJECTED
========
REJECTED IDEAS
==============

- #550: threads per core
- #1667: process_iter(new_only=True)

INCONSISTENCIES
===============
Expand Down
5 changes: 2 additions & 3 deletions psutil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,6 @@ def process_iter(attrs=None, ad_value=None):
to returned Process instance.
If *attrs* is an empty list it will retrieve all process info
(slow).
"""
def add(pid):
proc = Process(pid)
Expand All @@ -1449,8 +1448,8 @@ def remove(pid):
remove(pid)

with _lock:
ls = list(dict.fromkeys(new_pids).items())
ls.sort()
ls = sorted(list(_pmap.items()) +
list(dict.fromkeys(new_pids).items()))

for pid, proc in ls:
try:
Expand Down

0 comments on commit 41fcba5

Please sign in to comment.