Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从 pid 返回所有线程,但得到一个空列表 ( [])。这是代码:
[]
import psutil p = psutil.Process(3133) p.get_threads()
注意:pid 3133 存在,我使用的是 Python 3.3.5 和 psutil 2.1.1(32 位)。
我发现您只能从自己运行的进程中检索线程信息。