{"id":13436478,"url":"https://github.com/senlinzhan/dpool","last_synced_at":"2025-03-18T21:30:35.705Z","repository":{"id":45603528,"uuid":"89824668","full_name":"senlinzhan/dpool","owner":"senlinzhan","description":"使用 C++11 实现的动态线程池","archived":false,"fork":false,"pushed_at":"2023-10-20T11:53:44.000Z","size":10,"stargazers_count":172,"open_issues_count":2,"forks_count":24,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-27T20:19:49.321Z","etag":null,"topics":["c-plus-plus-11","dynamic-threadpool","high-performance","threadpool"],"latest_commit_sha":null,"homepage":null,"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/senlinzhan.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":"2017-04-30T02:25:13.000Z","updated_at":"2024-10-22T08:40:55.000Z","dependencies_parsed_at":"2024-10-27T19:13:53.650Z","dependency_job_id":"0e107169-e445-4757-a59a-577e7791f3d6","html_url":"https://github.com/senlinzhan/dpool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senlinzhan%2Fdpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senlinzhan%2Fdpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senlinzhan%2Fdpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senlinzhan%2Fdpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/senlinzhan","download_url":"https://codeload.github.com/senlinzhan/dpool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244310302,"owners_count":20432513,"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":["c-plus-plus-11","dynamic-threadpool","high-performance","threadpool"],"created_at":"2024-07-31T03:00:48.976Z","updated_at":"2025-03-18T21:30:33.448Z","avatar_url":"https://github.com/senlinzhan.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg) ![Build status](https://travis-ci.org/senlinzhan/dpool.svg?branch=master)\n# dpool \n\n使用 C++11 实现的动态线程池，主要特性：\n- 使用简单，不易出错。 \n- 支持线程复用，提升性能。\n- 支持懒惰创建线程。\n- 必要时自动回收空闲的线程。 \n\n## 快速上手\n```C++\n#include \"ThreadPool.hpp\"\n#include \u003ciostream\u003e\n\nint compute(int a, int b)\n{\n    return a + b;\n}\n\nint main()\n{\n    // 设置最大线程数为 10\n    dpool::ThreadPool pool(10);\n\n    auto fut = pool.submit(compute, 100, 100);\n    std::cout \u003c\u003c \"100 + 100 = \" \u003c\u003c fut.get() \u003c\u003c std::endl;\n    \n    return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenlinzhan%2Fdpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsenlinzhan%2Fdpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenlinzhan%2Fdpool/lists"}