Skip to main content

All Questions

Tagged with
4 votes
4 answers
2k views

Yet another shared_ptr implementation for learning purposes

C++ shared_ptr implemented as a coding practice and learning purposes. It uses std::shared_ptr interface. Basic tests are included (using single header Catch 2) Some methods are omitted to keep the ...
Tomas Tintera's user avatar
3 votes
2 answers
293 views

atomic spinlock mutex class

This here is the follow-up to this question. I was recommended to implement a Lockable type (similar to std::mutex) that can work with ...
digito_evo's user avatar
2 votes
1 answer
186 views

C++20 simple RwSeqLock

I recently discovered the atomic wait/notify mechanism in C++20 and wrote this readers-writer lock in the style of Linux kernel Seqlock. Writes have to be inside a lock/unlock, while reads are ...
MDH's user avatar
  • 23
2 votes
1 answer
132 views

Thread Pool Class

I have a thread_pool class, that mimics std::thread. (I would have liked std to have a pool, but alas that is not the case.) thread_pool.h ...
rioki's user avatar
  • 462
4 votes
1 answer
841 views

Thread Safe Queue

I have a thread safe queue in my library c9y. It is generally used as a task queue in the task_pool class, but in can be used for any producer / consumer problem. queue.h ...
rioki's user avatar
  • 462
2 votes
1 answer
2k views

C++20 Multi-queue Thread Pool with Work Stealing

This is a follow up to my previous post which also follows up on my first post regarding my thread pool implementation. I have since made some further changes and attempted to improve performance with ...
Developer Paul's user avatar
5 votes
2 answers
2k views

C++20 Single Queue Thread Pool

This is a follow up to my previous post. I've made a number of improvements to the thread pool and corrected some bugs as well. The most up to date version of the code is available on my Github. I ...
Developer Paul's user avatar
4 votes
1 answer
189 views

Order guaranteed recursive_transform template function implementation with execution policy in C++

This is a follow-up question for A recursive_transform Template Function with Execution Policy, A recursive_transform Template Function Implementation with std::invocable Concept and Execution Policy ...
JimmyHu's user avatar
  • 5,392
5 votes
2 answers
4k views

C++20 Thread Pool

I've implemented a thread pool using C++20. I'm fairly new to concurrently/multi-threaded programming and wanted to work on a project that I could learn from while also getting to know some of the new ...
Developer Paul's user avatar