Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
lockfree_queue.h File Reference

Backward compatibility header for concurrent_queue. More...

Include dependency graph for lockfree_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KCENON_THREAD_LOCKFREE_QUEUE_H_WARNED   1
 

Detailed Description

Backward compatibility header for concurrent_queue.

This header provides backward compatibility for code using the old include path. The implementation has been moved to: include/kcenon/thread/concurrent/concurrent_queue.h

Migration Guide

Update your includes from:

Backward compatibility header for concurrent_queue.

To:

Thread-safe MPMC queue with blocking wait support.

And update usage from:

kcenon::thread::lockfree_queue<int> queue; // Deprecated

To:

Thread-safe MPMC queue with blocking wait support (Internal implementation)
Definition forward.h:156

Why the change?

The name "lockfree_queue" was misleading because the implementation uses fine-grained locking (mutexes), not true lock-free algorithms. The rename to "concurrent_queue" accurately describes the thread-safe nature without implying lock-free semantics.

For a true lock-free queue, see lockfree_job_queue which uses the Michael-Scott algorithm with hazard pointers.

Deprecated
This header will be removed in a future major version. Use <kcenon/thread/concurrent/concurrent_queue.h> instead.

Definition in file lockfree_queue.h.

Macro Definition Documentation

◆ KCENON_THREAD_LOCKFREE_QUEUE_H_WARNED

#define KCENON_THREAD_LOCKFREE_QUEUE_H_WARNED   1

Definition at line 53 of file lockfree_queue.h.