


代码均跑了接近5分钟可以返现run1的VIRT(即第5列数据)远高于run2的,
过程中run2的VIRT基本不变保持在10828, 而run1de 一直在飙升。
run2大概跑了15min就因为创建线程失败而退出了。
注:VIRT表示虚拟内存占用。
代码均跑了接近5分钟可以返现run1的VIRT(即第5列数据)远高于run2的,
过程中run2的VIRT基本不变保持在10828, 而run1de 一直在飙升。
run2大概跑了15min就因为创建线程失败而退出了。
注:VIRT表示虚拟内存占用。
本文标题:为什么使用线程要用join或者detach管理线程生命
本文链接:https://www.haomeiwen.com/subject/lfsudktx.html
网友评论