Git Product home page Git Product logo

cpp-concurrency-in-action-2ed's Introduction

  1. 线程管理(Managing thread)<thread>
  2. 线程间共享数据(Sharing data between thread)<mutex><shared_mutex>
  3. 同步并发操作(Synchronizing concurrent operation)<condition_variable><semaphore><barrier><latch><future><chrono><ratio>
  4. C++ 内存模型和基于原子类型的操作(The C++ memory model and operations on atomic type)<atomic>

并发编程实践

  1. 基于锁的并发数据结构的设计(Designing lock-based concurrent data structure)
  2. 无锁并发数据结构的设计(Designing lock-free concurrent data structure)
  3. 并发代码的设计(Designing concurrent code)
  4. 高级线程管理(Advanced thread management)
  5. 并行算法(Parallel algorithm)<execution>
  6. 多线程应用的测试与调试(Testing and debugging multithreaded application)

标准库相关头文件

头文件 说明
<thread><stop_token> 线程
<mutex><shared_mutex>
<condition_variable> 条件变量
<semaphore> 信号量
<barrier><latch> 屏障
<future> 异步处理的结果
<chrono> 时钟
<ratio> 编译期有理数算数
<atomic> 原子类型和原子操作
<execution> 标准库算法执行策略

并发库对比

特性 API
thread std::thread
mutex std::mutexstd::lock_guardstd::unique_lock
condition variable std::condition_variablestd::condition_variable_any
atomic std::atomicstd::atomic_thread_fence
future std::futurestd::shared_future
interruption
特性 API
thread boost::thread
mutex boost::mutexboost::lock_guardboost::unique_lock
condition variable boost::condition_variableboost::condition_variable_any
atomic
future boost::futureboost::shared_future
interruption thread::interrupt
特性 API
thread pthread_createpthread_detachpthread_join
mutex pthread_mutex_lock、pthread_mutex_unlock
condition variable pthread_cond_waitpthread_cond_signal
atomic
future
interruption pthread_cancel
特性 API
thread java.lang.Thread
mutex synchronized blocks
condition variable java.lang.Object.waitjava.lang.Object.notify
atomic volatile 变量、java.util.concurrent.atomic
future java.util.concurrent.Future
interruption java.lang.Thread.interrupt
线程安全的容器 java.util.concurrent 中的容器
线程池 java.util.concurrent.ThreadPoolExecutor

cpp-concurrency-in-action-2ed's People

Contributors

downdemo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.