{"id":16608403,"url":"https://github.com/curve/poolparty","last_synced_at":"2026-02-06T13:02:30.797Z","repository":{"id":248542316,"uuid":"778546478","full_name":"Curve/poolparty","owner":"Curve","description":"🌊 A simple, yet versatile C++ Thread-Pool library","archived":false,"fork":false,"pushed_at":"2024-12-03T15:42:02.000Z","size":99,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T05:38:42.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Curve.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-27T23:22:55.000Z","updated_at":"2025-07-01T17:33:49.000Z","dependencies_parsed_at":"2024-07-15T17:27:55.611Z","dependency_job_id":"68395264-b484-4a14-a849-8e0bc8e5cc8a","html_url":"https://github.com/Curve/poolparty","commit_stats":null,"previous_names":["curve/poolparty"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Curve/poolparty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fpoolparty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fpoolparty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fpoolparty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fpoolparty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Curve","download_url":"https://codeload.github.com/Curve/poolparty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fpoolparty/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266041879,"owners_count":23867956,"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":[],"created_at":"2024-10-12T01:26:05.686Z","updated_at":"2026-02-06T13:02:25.759Z","avatar_url":"https://github.com/Curve.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.svg\" width=\"600\"\u003e\n\u003c/p\u003e\n\n## 📃 Description\n\n_poolparty_ is a simple and versatile C++20 thread-pool library.\n\n\u003e [!NOTE]\n\u003e This library does not handle exceptions. Please make sure to not throw from within tasks!\n\n## 📦 Installation\n\n* Using [CPM](https://github.com/cpm-cmake/CPM.cmake)\n  ```cmake\n  CPMFindPackage(\n    NAME           poolparty\n    VERSION        3.0.0\n    GIT_REPOSITORY \"https://github.com/Curve/poolparty\"\n  )\n  ```\n\n* Using FetchContent\n  ```cmake\n  include(FetchContent)\n\n  FetchContent_Declare(poolparty GIT_REPOSITORY \"https://github.com/Curve/poolparty\" GIT_TAG v3.0.0)\n  FetchContent_MakeAvailable(poolparty)\n\n  target_link_libraries(\u003ctarget\u003e cr::poolparty)\n  ```\n\n## 📖 Examples\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003cpoolparty/pool.hpp\u003e\n\nint expensive_calculation(int x)\n{\n    std::this_thread::sleep_for(std::chrono::seconds(2));\n    return x + 1;\n}\n\nint main()\n{\n    poolparty::pool pool{2};\n\n    // Pause execution\n    pool.pause();\n\n    auto fut1 = pool.submit(expensive_calculation, 1);\n    auto fut2 = pool.submit(expensive_calculation, 2);\n\n    // Let's add an additional thread\n    auto source = pool.add_thread();\n    auto fut3   = pool.submit(expensive_calculation, 3);\n\n    // Fire and forget\n    pool.forget([]() { expensive_calculation(100); });\n\n    // Resume execution\n    pool.resume();\n\n    std::cout \u003c\u003c \"Result: \" \u003c\u003c fut1.get() \u003c\u003c \", \" \u003c\u003c fut2.get() \u003c\u003c \" and \" \u003c\u003c fut3.get() \u003c\u003c std::endl;\n\n    // ...and remove the thread we've added\n    source.request_stop();\n    pool.cleanup();\n\n    return 0;\n}\n```\n\nIt's also possible to use a priority queue for more fine grained execution, see [tests](tests/priority.test.cpp):\n\nhttps://github.com/Curve/poolparty/blob/4f58b719c99238985c1e99be6b07f893cfbd9c50/tests/priority.test.cpp#L48-L62\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurve%2Fpoolparty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurve%2Fpoolparty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurve%2Fpoolparty/lists"}