Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exit を使わず全員終了する仕組み #2

Open
kotto5 opened this issue Mar 18, 2023 · 1 comment
Open

exit を使わず全員終了する仕組み #2

kotto5 opened this issue Mar 18, 2023 · 1 comment

Comments

@kotto5
Copy link
Owner

kotto5 commented Mar 18, 2023

main か waiter が監視するしかないよな~

kotto5 added a commit that referenced this issue Mar 18, 2023
疑問はいくつかある
1.なぜdead_info_arrayからmutex lock 等が出来ないのか
2.今、dead は一人しか出ないが、その後に出力が来ない保障無さそう
#2
@kotto5
Copy link
Owner Author

kotto5 commented Mar 18, 2023

これで完了してる

kotto5 added a commit that referenced this issue Mar 18, 2023
pthread_t mutex にはlock()できるっぽい
init は mutex に attribution をつけることが出来て
lock()した時に 永久停止させるか
失敗の返り値をすぐさま返すか
等 あるらしい
後者使いたい。優先順位は低い(めんどい せっかくやったのに)
逆に言えばinit() とは attribution を付与する関数なのかも。
#2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant