Skip to content

Handle empty bulk enqueue#3

Open
caomengxuan666 wants to merge 1 commit intodakingffo:masterfrom
caomengxuan666:fix-empty-enqueue-bulk
Open

Handle empty bulk enqueue#3
caomengxuan666 wants to merge 1 commit intodakingffo:masterfrom
caomengxuan666:fix-empty-enqueue-bulk

Conversation

@caomengxuan666
Copy link
Copy Markdown

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.

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.

1 participant