Skip to content

About

C++20 bounded thread-safe work queue with shutdown, backpressure and worker pool.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Safe Task Queue

View execution evidence

A concurrent executor with bounded queue capacity, priorities, task-start deadlines, futures, and shutdown that drains or cancels queued tasks.

Run

Requirements: C++20 and CMake.

cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failure
build/task_queue > result.json

Behavior

The reusable implementation is in include/task_queue.hpp. Tests cover 1,000 concurrent tasks, exceptions, deadlines, and rejection after shutdown. A deadline is checked before a task starts; it does not interrupt a running task.

Optional report archive

Use the native C operations archive client to queue result.json under project cpp-safe-task-queue. The client uses BRUNNODEV_ACCESS_TOKEN and retains unacknowledged reports locally.

License

Original source and documentation are MIT licensed; see LICENSE. Third-party dependencies and media retain their respective terms. Maintained by Brunno Dev.

Implementation update

Concurrent shutdown calls are serialized. Workers cannot initiate a shutdown that would join their own thread. Native regression checks cover worker rejection, concurrent shutdown and completed-task metrics.

Contribution trailer: Co-authored-by: nyctophile <[email protected]>.

Execution proof

Executable proof

Recorded program execution

Verified run · Execution report

Run python .proof/record.py after installing the prerequisites above. The scenarios execute repository code and verify exit codes and expected output. CI publishes execution-proof with the transcript, input fingerprints and source commit. The downloadable report identifies the exact tested version; the workflow badge tracks the latest run.

About

C++20 bounded thread-safe work queue with shutdown, backpressure and worker pool.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages