{"id":21198483,"url":"https://github.com/conorwilliams/concurrentdeque","last_synced_at":"2026-03-12T11:03:45.028Z","repository":{"id":43172107,"uuid":"346636663","full_name":"ConorWilliams/ConcurrentDeque","owner":"ConorWilliams","description":"Fast, generalized, implementation of the Chase-Lev lock-free work-stealing deque for C++17","archived":false,"fork":false,"pushed_at":"2021-09-11T08:42:03.000Z","size":1126,"stargazers_count":146,"open_issues_count":0,"forks_count":7,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-30T22:06:24.411Z","etag":null,"topics":["chase-lev","concurrent-data-structure","lock-free-queue","multithreading","parallel-computing","work-stealing"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ConorWilliams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-11T08:51:05.000Z","updated_at":"2025-05-22T14:13:22.000Z","dependencies_parsed_at":"2022-09-12T19:40:58.476Z","dependency_job_id":null,"html_url":"https://github.com/ConorWilliams/ConcurrentDeque","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ConorWilliams/ConcurrentDeque","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorWilliams%2FConcurrentDeque","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorWilliams%2FConcurrentDeque/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorWilliams%2FConcurrentDeque/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorWilliams%2FConcurrentDeque/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConorWilliams","download_url":"https://codeload.github.com/ConorWilliams/ConcurrentDeque/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorWilliams%2FConcurrentDeque/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264535997,"owners_count":23624405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chase-lev","concurrent-data-structure","lock-free-queue","multithreading","parallel-computing","work-stealing"],"created_at":"2024-11-20T19:51:53.201Z","updated_at":"2026-03-12T11:03:44.993Z","avatar_url":"https://github.com/ConorWilliams.png","language":"C++","readme":"# `riften::Deque` \n\n\nA bleeding-edge lock-free, single-producer multi-consumer, Chase-Lev work stealing deque as presented in the paper \"Dynamic Circular Work-Stealing Deque\" and further improved in the follow up paper: \"Correct and Efficient Work-Stealing for Weak Memory Models\". \n\nThis implementation is based on:\n- https://github.com/taskflow/work-stealing-queue\n- https://github.com/ssbl/concurrent-deque\n\n`riften::Deque` places very few constraints on the types which can be placed in the deque (they must be default initializable, trivially destructible and have nothrow move constructor/assignment operators) and has no memory overhead associated with buffer recycling. \n\n## Usage\n\n```C++\n    // #include \u003cthread\u003e\n\n    // #include \"riften/deque.hpp\"\n\n    // Work-stealing deque of ints\n    riften::Deque\u003cint\u003e deque;\n\n    // One thread can push and pop items from one end (like a stack)\n    std::thread owner([\u0026]() {\n        for (int i = 0; i \u003c 10000; i = i + 1) {\n            deque.emplace(i);\n        }\n        while (!deque.empty()) {\n            std::optional item = deque.pop();\n        }\n    });\n\n    // While multiple (any) threads can steal items from the other end\n    std::thread thief([\u0026]() {\n        while (!deque.empty()) {\n            std::optional item = deque.steal();\n        }\n    });\n\n    owner.join();\n    thief.join();\n```\n\n## CMake\n\nThis is a single-header library. Additionally, the library can be installed:\n```zsh\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake \u0026\u0026 make install\n```\nand then imported into your CMake project by including:\n```CMake\nfind_package(RiftenDeque REQUIRED)\n```\nin your `CMakeLists.txt` file.\n\n### CPM.cmake\n\nThe recommended way to consume this library is through [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake), just add:\n\n```CMake\nCPMAddPackage(\"gh:ConorWilliams/ConcurrentDeque#v1.1.0\")\n```\nto your `CMakeLists.txt` and you're good to go!\n\n## Tests\n\nTo compile and run the tests:\n```zsh\nmkdir build \u0026\u0026 cd build\ncmake ../test\nmake \u0026\u0026 make test\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorwilliams%2Fconcurrentdeque","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconorwilliams%2Fconcurrentdeque","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorwilliams%2Fconcurrentdeque/lists"}