"同时互斥锁的作用域仅仅在于线程,信号量可以作用于线程和进程。" 看到说,Mutex也可以用于跨进程间,比如同一个Mutex。这样对吗? https://stackoverflow.com/questions/9389730/is-it-possible-to-use-mutex-in-multiprocessing-case-on-linux-unix "The process-shared attribute is set to PTHREAD_PROCESS_SHARED to permit a mutex to be operated upon by any thread that has access to the memory where the mutex is allocated, even if the mutex is allocated in memory that is shared by multiple processes"
点赞

相关推荐

11-14 16:15
已编辑
湖南工业大学 Java
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务