std::mutex in shared memory not working

前端 未结 3 1090
庸人自扰
庸人自扰 2020-12-21 14:24

I have a scenario where the shared memory area is exclusively accessed by two different processes. When I launch the processes, the first process successfully locks the mute

3条回答
  •  死守一世寂寞
    2020-12-21 15:30

    std::mutex does not support interprocess operation but pthread library has interprocess mutex that you can use. Example here.

提交回复
热议问题