{"id":18018950,"url":"https://github.com/maratyszcza/pthreadpool","last_synced_at":"2025-09-20T08:58:33.719Z","repository":{"id":36808990,"uuid":"41115850","full_name":"Maratyszcza/pthreadpool","owner":"Maratyszcza","description":"Portable (POSIX/Windows/Emscripten) thread pool for C/C++","archived":false,"fork":false,"pushed_at":"2024-06-16T19:49:19.000Z","size":212,"stargazers_count":368,"open_issues_count":12,"forks_count":148,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-05-24T16:22:37.932Z","etag":null,"topics":["multi-core","multi-threading","pthreads","threadpool"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Maratyszcza.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":"2015-08-20T19:51:18.000Z","updated_at":"2025-05-16T16:28:12.000Z","dependencies_parsed_at":"2024-01-16T01:55:29.668Z","dependency_job_id":"2bafe869-3502-4c31-a087-5fb607e9ae83","html_url":"https://github.com/Maratyszcza/pthreadpool","commit_stats":{"total_commits":143,"total_committers":11,"mean_commits":13.0,"dds":0.5454545454545454,"last_synced_commit":"edeb5d6b967bef092ff195ab40e216fa5ac11f61"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Maratyszcza/pthreadpool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maratyszcza%2Fpthreadpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maratyszcza%2Fpthreadpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maratyszcza%2Fpthreadpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maratyszcza%2Fpthreadpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maratyszcza","download_url":"https://codeload.github.com/Maratyszcza/pthreadpool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maratyszcza%2Fpthreadpool/sbom","scorecard":{"id":89638,"data":{"date":"2025-08-11","repo":{"name":"github.com/Maratyszcza/pthreadpool","commit":"560c60d342a76076f0557a3946924c6478470044"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":5,"reason":"Found 16/28 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 2-Clause \"Simplified\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.1 not signed: https://api.github.com/repos/Maratyszcza/pthreadpool/releases/1720768","Warn: release artifact 0.1 does not have provenance: https://api.github.com/repos/Maratyszcza/pthreadpool/releases/1720768"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T07:40:09.003Z","repository_id":36808990,"created_at":"2025-08-15T07:40:09.003Z","updated_at":"2025-08-15T07:40:09.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276070743,"owners_count":25580129,"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","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["multi-core","multi-threading","pthreads","threadpool"],"created_at":"2024-10-30T05:07:57.592Z","updated_at":"2025-09-20T08:58:33.685Z","avatar_url":"https://github.com/Maratyszcza.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pthreadpool\n\n[![BSD (2 clause) License](https://img.shields.io/badge/License-BSD%202--Clause%20%22Simplified%22%20License-blue.svg)](https://github.com/Maratyszcza/pthreadpool/blob/master/LICENSE)\n[![Build Status](https://img.shields.io/travis/Maratyszcza/pthreadpool.svg)](https://travis-ci.org/Maratyszcza/pthreadpool)\n\n**pthreadpool** is a portable and efficient thread pool implementation.\nIt provides similar functionality to `#pragma omp parallel for`, but with additional features.\n\n## Features:\n\n* C interface (C++-compatible).\n* 1D-6D loops with step parameters.\n* Run on user-specified or auto-detected number of threads.\n* Work-stealing scheduling for efficient work balancing.\n* Wait-free synchronization of work items.\n* Compatible with Linux (including Android), macOS, iOS, Windows, Emscripten environments.\n* 100% unit tests coverage.\n* Throughput and latency microbenchmarks.\n\n## Example\n\n  The following example demonstates using the thread pool for parallel addition of two arrays:\n\n```c\nstatic void add_arrays(struct array_addition_context* context, size_t i) {\n  context-\u003esum[i] = context-\u003eaugend[i] + context-\u003eaddend[i];\n}\n\n#define ARRAY_SIZE 4\n\nint main() {\n  double augend[ARRAY_SIZE] = { 1.0, 2.0, 4.0, -5.0 };\n  double addend[ARRAY_SIZE] = { 0.25, -1.75, 0.0, 0.5 };\n  double sum[ARRAY_SIZE];\n\n  pthreadpool_t threadpool = pthreadpool_create(0);\n  assert(threadpool != NULL);\n\n  const size_t threads_count = pthreadpool_get_threads_count(threadpool);\n  printf(\"Created thread pool with %zu threads\\n\", threads_count);\n\n  struct array_addition_context context = { augend, addend, sum };\n  pthreadpool_parallelize_1d(threadpool,\n    (pthreadpool_task_1d_t) add_arrays,\n    (void*) \u0026context,\n    ARRAY_SIZE,\n    PTHREADPOOL_FLAG_DISABLE_DENORMALS /* flags */);\n\n  pthreadpool_destroy(threadpool);\n  threadpool = NULL;\n\n  printf(\"%8s\\t%.2lf\\t%.2lf\\t%.2lf\\t%.2lf\\n\", \"Augend\",\n    augend[0], augend[1], augend[2], augend[3]);\n  printf(\"%8s\\t%.2lf\\t%.2lf\\t%.2lf\\t%.2lf\\n\", \"Addend\",\n    addend[0], addend[1], addend[2], addend[3]);\n  printf(\"%8s\\t%.2lf\\t%.2lf\\t%.2lf\\t%.2lf\\n\", \"Sum\",\n    sum[0], sum[1], sum[2], sum[3]);\n\n  return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaratyszcza%2Fpthreadpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaratyszcza%2Fpthreadpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaratyszcza%2Fpthreadpool/lists"}