开发者

boost interprocess mutex vs boost thread mutex

I'm just realized that it seems to have two mutex 'world' in Boost. definition of some mutex under boost::interprocess and mutex under boost::thread.. could both be use开发者_C百科 interchangeably ? for exemple scoped_lock with boost::wait ?


As far as I know you can use interprocess mutex instead of boost::thread mutex , but take into account they'll be probably slower as they are intended to run in interprocess memory.

You cannot use the synchronization mechanisms from thread and use them in interprocess, these are not at all designed for multi-process synchronization.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜