10 2021 档案

摘要:哲学家进餐问题的mutex解法 筷子的数据结构 typedef struct chopstick { pthread_mutex_t mtx; char* whoami; } chopstick_t; chopstick_t* chopstick_get(char const* const str) 阅读全文
posted @ 2021-10-12 11:28 uttep 阅读(155) 评论(0) 推荐(0)
摘要:#include <iostream> #include <thread> #include <string> #include <vector> #include <memory> #include <algorithm> #include <numeric> #include <random> 阅读全文
posted @ 2021-10-08 14:54 uttep 阅读(165) 评论(0) 推荐(0)