Skip to content

Modern skills for multithreading and concurrency in C++

License

Notifications You must be signed in to change notification settings

ChunMinChang/muzuka-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muzuka-c

This is a collection of some modern skills for multithreading and concurrency in C++

  • Mutex
    • SpinlockMutex: A simple mutex implementation based on std::atomic_flag::test_and_set
    • DataMutex: A Rust-style mutex in C++
  • Task Queue
    • SimpleSerialTaskQueue: A simple serial queue implementation
    • TaskQueue: A general task queue running tasks in parallel. The concept is similar to SimpleSerialTaskQueue but it runs the tasks in several threads at the same time instead of running them sequentially
  • Ring Buffer
    • SPSCRingBuffer: A thread-safe single-producer-single-consumer circular buffer

Run the demo

Run run.sh <FOLDER_NAME> to play the examples, where the <FOLDER_NAME> is mutex, task_queue, or ring_buffer. Or you can simply go to those folder then build examples by running make and clean them by make clean.

Concurrent programming references

Lock-free

Code Examples

SPSC
MPMC
MPSC

About

Modern skills for multithreading and concurrency in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published