1、获取进程ID。(getpid)
os.getpid()
2、获取父进程ID。(getppid)
os.getppid()
3、获取线程ID。(get_ident)
(1)、进程内局部标识。
import threading threading.get_ident() threading.current_thread().ident
(2)、系统全局标识:python下使用ctypes获取threading线程id。
*** walker ***
本文出自 “walker的流水账” 博客,请务必保留此出处http://walkerqt.blog.51cto.com/1310630/1893879
原文:http://walkerqt.blog.51cto.com/1310630/1893879