C++11 equivalent to boost shared_mutex

前端 未结 3 1405
日久生厌
日久生厌 2020-11-28 06:04

Is there a C++11 equivalent for the boost::shared_mutex. Or another solution to handle a multiple reader / single writer situation in C++11?

3条回答
  •  心在旅途
    2020-11-28 06:28

    I tried but failed to get shared_mutex into C++11. It has been proposed for a future standard. The proposal is here.

    Edit: A revised version (N3659) was accepted for C++14.

    Here is an implementation:

    http://howardhinnant.github.io/shared_mutex

    http://howardhinnant.github.io/shared_mutex.cpp

提交回复
热议问题