Fully thread-safe shared_ptr implementation

后端 未结 9 1455
面向向阳花
面向向阳花 2021-02-02 17:02

Does anybody know of a fully thread-safe shared_ptr implementation? E.g. boost implementation of shared_ptr is thread-safe for the targets (refcounting

9条回答
  •  一向
    一向 (楼主)
    2021-02-02 17:25

    Your compiler may already provide the thread safe smart pointers in the newer C++ Standards. I believe TBB is planning on adding a smart pointer, but I don't think it's been included yet. You may be able to use one of TBB's thread-safe containers, though.

提交回复
热议问题