Skip to content

refactor(queue): fix misleading lockfree_queue naming#370

Merged
kcenon merged 2 commits into
mainfrom
refactor/fix-lockfree-queue-naming
Jan 2, 2026
Merged

refactor(queue): fix misleading lockfree_queue naming#370
kcenon merged 2 commits into
mainfrom
refactor/fix-lockfree-queue-naming

Conversation

@kcenon

@kcenon kcenon commented Jan 2, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes issue #359 - Fix misleading lockfree_queue naming that violates Kent Beck's "Reveals Intention" principle.

  • Create concurrent/ directory for fine-grained locking implementations
  • Move concurrent_queue implementation to new location
  • Convert lockfree/lockfree_queue.h to backward compatibility header
  • Improve deprecation messages with "MISLEADING NAME" warning
  • Update tests to use new include path and detail:: namespace
  • Update API documentation with new header paths

Changes

Code Changes

  • New: include/kcenon/thread/concurrent/concurrent_queue.h - Main implementation location
  • Modified: include/kcenon/thread/lockfree/lockfree_queue.h - Now a backward compatibility header
  • Modified: include/kcenon/thread/forward.h - Updated deprecation message
  • Modified: tests/unit/lockfree_test/lockfree_queue_test.cpp - Use new include path

Documentation Changes

Test Plan

  • All existing tests pass
  • lockfree_queue_test uses new include path and compiles
  • Backward compatibility header works correctly

Migration Guide

// Before
#include <kcenon/thread/lockfree/lockfree_queue.h>
kcenon::thread::lockfree_queue<int> queue;  // Deprecated warning

// After
#include <kcenon/thread/concurrent/concurrent_queue.h>
kcenon::thread::detail::concurrent_queue<int> queue;  // Correct

Closes #359

kcenon added 2 commits January 2, 2026 12:37
- Create concurrent/ directory for fine-grained locking implementations
- Move concurrent_queue implementation to concurrent/concurrent_queue.h
- Update lockfree_queue.h as backward compatibility header
- Improve deprecation messages with "MISLEADING NAME" warning
- Update lockfree_queue alias to reference true lock-free alternative
- Update tests to use new include path and detail:: namespace

This change implements Phase 2-3 of issue #359 to fix misleading
lockfree_queue naming that violates Kent Beck's "Reveals Intention"
principle.
- Update API_REFERENCE.md with new concurrent/ directory path
- Update API_REFERENCE_KO.md with new header location
- Add issue #359 entries to CHANGELOG.md and CHANGELOG_KO.md
- Document detail:: namespace and migration guidance
@github-actions

github-actions Bot commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

📊 Performance Benchmark Results

Performance Benchmark Report

No benchmark data available.

ℹ️ No baseline reference available

This is the first benchmark run or baseline file is missing.

@kcenon kcenon merged commit a827786 into main Jan 2, 2026
26 checks passed
@kcenon kcenon deleted the refactor/fix-lockfree-queue-naming branch January 2, 2026 04:43
kcenon added a commit that referenced this pull request Apr 13, 2026
* refactor(queue): move concurrent_queue to dedicated directory

- Create concurrent/ directory for fine-grained locking implementations
- Move concurrent_queue implementation to concurrent/concurrent_queue.h
- Update lockfree_queue.h as backward compatibility header
- Improve deprecation messages with "MISLEADING NAME" warning
- Update lockfree_queue alias to reference true lock-free alternative
- Update tests to use new include path and detail:: namespace

This change implements Phase 2-3 of issue #359 to fix misleading
lockfree_queue naming that violates Kent Beck's "Reveals Intention"
principle.

* docs: update API references for concurrent_queue location change

- Update API_REFERENCE.md with new concurrent/ directory path
- Update API_REFERENCE_KO.md with new header location
- Add issue #359 entries to CHANGELOG.md and CHANGELOG_KO.md
- Document detail:: namespace and migration guidance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] Fix misleading lockfree_queue naming - Kent Beck Reveals Intention

1 participant