Skip to content

Handle empty bulk enqueue#3

Merged
dakingffo merged 2 commits intodakingffo:masterfrom
caomengxuan666:fix-empty-enqueue-bulk
May 6, 2026
Merged

Handle empty bulk enqueue#3
dakingffo merged 2 commits intodakingffo:masterfrom
caomengxuan666:fix-empty-enqueue-bulk

Conversation

@caomengxuan666
Copy link
Copy Markdown
Contributor

Summary

  • make enqueue_bulk(value, 0) a no-op
  • make enqueue_bulk(iterator, 0) and enqueue_bulk(begin, end) with an empty range no-ops
  • add regression coverage for empty bulk enqueue inputs

Validation

  • cmake -S . -B out/build/empty-bulk -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_GOOGLEBENCHMARK=... -DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=... -DFETCHCONTENT_SOURCE_DIR_HDRHISTOGRAM=...
  • cmake --build out/build/empty-bulk --target mpsc_tests reaches link step after compiling the changed source and tests

Note: full link/test execution is blocked on Windows clang because current master links atomic.lib for non-MSVC compilers; this is unrelated to this change and is addressed separately in PR #2.

caomengxuan666 and others added 2 commits May 3, 2026 15:24
Add branch prediction `DAKING_UNLIKELY` for empty bulk operation.
@dakingffo dakingffo self-assigned this May 6, 2026
@dakingffo
Copy link
Copy Markdown
Owner

Correct repair for empty_bulk_enqueue.

@dakingffo dakingffo merged commit c4bda57 into dakingffo:master May 6, 2026
8 checks passed
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.

2 participants