{"id":16936543,"url":"https://github.com/jonhoo/pthread_pool","last_synced_at":"2025-03-22T12:32:02.319Z","repository":{"id":13884270,"uuid":"16582410","full_name":"jonhoo/pthread_pool","owner":"jonhoo","description":"A simple implementation of thread pooling for C/C++ using POSIX threads","archived":false,"fork":false,"pushed_at":"2020-10-01T01:28:44.000Z","size":180,"stargazers_count":80,"open_issues_count":0,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-15T14:55:58.586Z","etag":null,"topics":["multi-core","multithreading","posix-threads","pthreads","thread-pool"],"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/jonhoo.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}},"created_at":"2014-02-06T14:56:05.000Z","updated_at":"2025-01-11T21:18:21.000Z","dependencies_parsed_at":"2022-08-23T14:50:11.084Z","dependency_job_id":null,"html_url":"https://github.com/jonhoo/pthread_pool","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/jonhoo%2Fpthread_pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fpthread_pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fpthread_pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fpthread_pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhoo","download_url":"https://codeload.github.com/jonhoo/pthread_pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959444,"owners_count":20538625,"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":["multi-core","multithreading","posix-threads","pthreads","thread-pool"],"created_at":"2024-10-13T20:57:15.135Z","updated_at":"2025-03-22T12:32:02.078Z","avatar_url":"https://github.com/jonhoo.png","language":"C","readme":"pthread_pool\n============\n\nA simple implementation of thread pooling for C/C++ using POSIX threads.\n\nEach pool has a designated worker function, and expects to be given a number of\nwork items. Any thread in the pool can take a work item, and will pass the work\nitem to the pool's worker function. The work items are `void *`, and are passed\nto the worker function exactly as they are given to `pool_enqueue`. The return\nvalues of the worker functions are ignored.\n\nFour functions of interest are provided:\n\n  - `pool_start` will start a new pool. The worker function and number of\n    threads in the pool need to be given as arguments.\n  - `pool_enqueue` will add a new work item to the pool. The work item data\n    pointer should be passed, as well as a flag specifying whether the work item\n    should be free'd after the work item has been processed (or if the pool is\n    terminated).\n  - `pool_wait` will block until all queued work items have been processed.\n  - `pool_end` should be called when the pool is no longer needed. This\n    terminates the threads, deallocates the queue and the pool, as well as any\n    freeable work items.\n\nFurther documentation is given in Doxygen format in `pthread_pool.h`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fpthread_pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhoo%2Fpthread_pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fpthread_pool/lists"}