Commit 6248191
feat(concurrentqueue): add compat.concurrentqueue 1.0.5 (#278)
moodycamel::ConcurrentQueue — the lock-free MPMC queue, plus its blocking
sibling and a flat C API over both. Shape B (header-only): the three public
headers sit at the tarball root, so `include_dirs = {"*"}` plus an anchor TU
is the package; consumers write `#include <concurrentqueue.h>` exactly as
upstream's README shows.
The one compilable optional component — `c_api/`'s two extern "C" wrapper
TUs — sits behind a default-off `c-api` feature (the compat.cjson `utils`
precedent). Windows needs `MOODYCAMEL_STATIC` on BOTH sides: the header
defaults to `__declspec(dllimport)`, which is wrong for the package's own
TUs (they define the functions, and `cflags` never reaches a .cpp — hence
`cxxflags`) and for a static-archive consumer (hence the feature's
interface `defines`). The macro is only read under `#ifdef _WIN32`, so
defining it everywhere is inert on linux/macos. Verified in the emitted
compile_commands.json that all four TUs carry it.
Tests: tests/examples/concurrentqueue asserts FIFO order, bulk round-trips,
move-only elements, a blocking consumer that REALLY waits (empty-queue
wait_dequeue_timed must burn its 50ms timeout), and a 4x4 MPMC race checked
for exact-once delivery. tests/examples/concurrentqueue-c-api consumes the
feature and round-trips integers through the void* C API. Both members
register in the workspace manifest.
Verified locally with mcpp 2026.8.27.1 (CI pins 2026.8.27.2; the release
CDN times out from this host): both members green from cold; the gate is
real — a TU referencing moodycamel_cq_create against the default build
fails to LINK (undefined reference), and the default build's object dir
holds the anchor alone. No CN mirror: no GITCODE_TOKEN on this host, so the
descriptor uses the plain-string upstream url fallback and the descriptor
catalog entry lands in docs/descriptor-examples.md (+ zh), per the post-#277
README layout.
Co-authored-by: gong <gzj17607270093@163.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 27b5c28 commit 6248191
9 files changed
Lines changed: 520 additions & 2 deletions
File tree
- .agents/docs
- docs
- zh
- pkgs/c
- tests/examples
- concurrentqueue-c-api
- tests
- concurrentqueue
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments