{"id":15047473,"url":"https://github.com/cppplayground/simple-threadpool","last_synced_at":"2025-12-30T10:45:59.680Z","repository":{"id":176744840,"uuid":"656354320","full_name":"CppPlayground/Simple-ThreadPool","owner":"CppPlayground","description":"a simple and lightweight header only ThreadPool for your tasks","archived":false,"fork":false,"pushed_at":"2023-06-20T20:01:51.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-20T15:59:26.336Z","etag":null,"topics":["cpp","cpp11","cpp14","cpp17","cpp20","header-only","thread-pool"],"latest_commit_sha":null,"homepage":"","language":"C++","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/CppPlayground.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":"2023-06-20T19:25:55.000Z","updated_at":"2023-06-21T06:16:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"76cab796-0f98-4c4b-a6d9-7b7c944714cb","html_url":"https://github.com/CppPlayground/Simple-ThreadPool","commit_stats":null,"previous_names":["cppplayground/simple-threadpool"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CppPlayground%2FSimple-ThreadPool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CppPlayground%2FSimple-ThreadPool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CppPlayground%2FSimple-ThreadPool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CppPlayground%2FSimple-ThreadPool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CppPlayground","download_url":"https://codeload.github.com/CppPlayground/Simple-ThreadPool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243475328,"owners_count":20296714,"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":["cpp","cpp11","cpp14","cpp17","cpp20","header-only","thread-pool"],"created_at":"2024-09-24T20:58:52.788Z","updated_at":"2025-12-30T10:45:59.631Z","avatar_url":"https://github.com/CppPlayground.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Header only simple thread pool\n\n\u003e put your tasks into threads\n\n\n## How to use it\n\n```c++\n#include \"ThreadPool.h\"\n#include \u003ciostream\u003e\n\nvoid printNumber(int number) { std::cout \u003c\u003c \"Number: \" \u003c\u003c number \u003c\u003c std::endl; }\n\nint main() {\n    ThreadPool pool(4);\n\n    std::vector\u003cstd::future\u003cvoid\u003e\u003e results;\n\n    // starting the threads\n    for (int i = 0; i \u003c 8; ++i) {\n        results.emplace_back(pool.enqueue(printNumber, i));\n    }\n\n    // getting the results\n    for (auto \u0026\u0026result : results) {\n        result.get();\n    }\n\n    return 0;\n}\n```\n\nmultiply example\n\n```c++\n#include \"ThreadPool.h\"\n#include \u003ciostream\u003e\n\nint multiply(const int a, const int b) {\n    return a * b;\n}\n\nint main() {\n    ThreadPool pool(12);\n\n    std::future\u003cint\u003e result = pool.enqueue(multiply, 3, 5);\n\n    std::cout\u003c\u003c result.get();\n\n    return 0;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppplayground%2Fsimple-threadpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppplayground%2Fsimple-threadpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppplayground%2Fsimple-threadpool/lists"}