V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
paparika
V2EX  ›  Linux

求靠谱 C++11 的读写锁代码

  •  
  •   paparika · Aug 27, 2018 · 5188 views
    This topic created in 2803 days ago, the information mentioned may be changed or developed.

    boost 倒是有,但是懒得一点一点抠出来,google 了一圈没找到靠谱的,想做伸手党,老铁们有木有

    7 replies    2018-08-28 08:53:43 +08:00
    sbw
        1
    sbw  
       Aug 27, 2018
    std::shared_mutex
    paparika
        2
    paparika  
    OP
       Aug 27, 2018
    @sbw c11 木有的
    billwsy
        3
    billwsy  
       Aug 27, 2018 via iPhone
    absl::ReaderMutexLock
    limhiaoing
        4
    limhiaoing  
       Aug 27, 2018 via iPhone
    C++11 可以用 std::mutex、std::condition_variable 来实现读写锁。用这 3 个关键字能搜出一堆结果。
    lcdtyph
        5
    lcdtyph  
       Aug 27, 2018 via iPhone
    facebook 的 folly 有读写锁
    wanderpoet
        6
    wanderpoet  
       Aug 27, 2018 via iPhone
    Scott 的 modern c++翻一下 有专门两节讲这个
    lrxiao
        7
    lrxiao  
       Aug 28, 2018
    抄下 shared_mutex 啊...实现的还是 11 可以的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2633 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 12:07 · PVG 20:07 · LAX 05:07 · JFK 08:07
    ♥ Do have faith in what you're doing.