{"id":60351,"library":"pthreadpool","title":"pthreadpool","description":"Portable (POSIX/Windows/Emscripten) thread pool for C/C++","status":"active","version":"2024-11-04","language":"cpp","source_language":null,"source_url":null,"tags":["thread-pool","parallel","portable","concurrency"],"install":[{"cmd":"vcpkg install pthreadpool","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(pthreadpool CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE pthreadpool::pthreadpool)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"pthreadpool.h","correct":"#include <pthreadpool.h>"}],"quickstart":{"code":"#include <pthreadpool.h>\n#include <stdio.h>\n\nvoid work(void* arg) {\n    printf(\"Thread %zu\\n\", (size_t)arg);\n}\n\nint main() {\n    pthreadpool_t pool = pthreadpool_create(4);\n    pthreadpool_parallelize_1d(pool, work, (void*)0, 10, 0);\n    pthreadpool_destroy(pool);\n    return 0;\n}","lang":"cpp","description":"Create a thread pool and parallelize a 1D loop"},"warnings":[],"env_vars":null,"search_vec":"'c/c':7 'concurr':13 'parallel':11 'pool':5,10 'portabl':2,12 'posix/windows/emscripten':3 'pthreadpool':1 'thread':4,9 'thread-pool':8","created_at":"2026-06-16T19:26:53.818124+00:00","updated_at":"2026-06-16T19:26:53.818124+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["async"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}