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
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!