Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
paparika
V2EX  ›  Linux

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

  •  
  •   paparika · Aug 27, 2018 · 5245 views
    This topic created in 2837 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   ·   3213 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 93c8b4a0 · 41ms · UTC 13:53 · PVG 21:53 · LAX 06:53 · JFK 09:53
    ♥ Do have faith in what you're doing.