1 Star 0 Fork 0

BostonHsu/PuringMyCPlusPlusTech

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
reason_for_atomic_test.txt 833 Bytes
一键复制 编辑 原始数据 按行查看 历史
A app has a main running stream, the main function.
A thread created in main function.
Main function stream creates a thread like mom birth a baby,
but main stream doesn't care of his baby, the thread stream.
Main stream is running while the thread is running.
At last, one of them must be terminated, maybe main stream or
the thread one.
If thread had done before main, main had done after that. So the
Whole app finished okly.
If main had done while thread running, main has gone immediately
with careless of his baby thread.
Main gone is equal to the whole app done, and the environment of
the whole app is cleared by the OS(God father). But the thread's
body is still in the memory, and can be executed by OS.
So the thread would touch the unowner memory field, it is a
criminal. So the thread would be punished by the father.
-
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/bostonhsu/puring-my-cplus-plus-tech.git
[email protected]:bostonhsu/puring-my-cplus-plus-tech.git
bostonhsu
puring-my-cplus-plus-tech
PuringMyCPlusPlusTech
master

搜索帮助