{"id":17163093,"url":"https://github.com/isty001/worker","last_synced_at":"2025-10-23T17:46:12.952Z","repository":{"id":96616863,"uuid":"81682333","full_name":"Isty001/worker","owner":"Isty001","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-16T12:25:27.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T21:54:37.544Z","etag":null,"topics":["c","pthread","thread","worker"],"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/Isty001.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-02-11T21:05:52.000Z","updated_at":"2021-02-16T12:25:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"d88ac796-0e65-43e1-b229-13fdc60f8e8e","html_url":"https://github.com/Isty001/worker","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/Isty001%2Fworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isty001%2Fworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isty001%2Fworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isty001%2Fworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Isty001","download_url":"https://codeload.github.com/Isty001/worker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245313483,"owners_count":20595121,"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","pthread","thread","worker"],"created_at":"2024-10-14T22:47:46.210Z","updated_at":"2025-10-23T17:46:12.891Z","avatar_url":"https://github.com/Isty001.png","language":"C","readme":"\nSmall threaded worker s using pthread.\n\n### Example\n\n```c\nint execute(char *msg)\n{\n    puts(msg);\n    \n    if (somethin_went_wrong) {\n        return -1;\n    }\n    \n    return 0;\n}\n\nvoid handle(int err)\n{\n    printf(\"Something went wrong. Error %d\", err);\n}\n\nint main(void)\n{\n    Queue *s = queue_new();\n    uint16_t sleep_ms = 100;\n    Worker *worker = worker_new(s, (Executor) execute, handle, sleep_ms);\n    \n    worker_run(worker);\n    \n    queue_add(s, \"Hello\");\n    \n    worker_kill(worker); //or worker_free(worker);\n    \n    return 0;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisty001%2Fworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisty001%2Fworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisty001%2Fworker/lists"}