{"id":31755605,"url":"https://github.com/brendanddev/custom-thread-pool","last_synced_at":"2025-10-09T18:54:54.583Z","repository":{"id":317392760,"uuid":"1067139615","full_name":"brendanddev/custom-thread-pool","owner":"brendanddev","description":"A Java implementation of a custom thread pool that demonstrates how task execution, worker management, and graceful shutdown work under the hood.","archived":false,"fork":false,"pushed_at":"2025-10-07T17:17:57.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T17:25:04.122Z","etag":null,"topics":["thread-pool","threads"],"latest_commit_sha":null,"homepage":"","language":"Java","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/brendanddev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-30T12:39:07.000Z","updated_at":"2025-10-07T17:18:00.000Z","dependencies_parsed_at":"2025-09-30T16:33:36.982Z","dependency_job_id":null,"html_url":"https://github.com/brendanddev/custom-thread-pool","commit_stats":null,"previous_names":["brendanddev/custom-thread-pool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brendanddev/custom-thread-pool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanddev%2Fcustom-thread-pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanddev%2Fcustom-thread-pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanddev%2Fcustom-thread-pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanddev%2Fcustom-thread-pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brendanddev","download_url":"https://codeload.github.com/brendanddev/custom-thread-pool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanddev%2Fcustom-thread-pool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001867,"owners_count":26083226,"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-10-09T02:00:07.460Z","response_time":59,"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":["thread-pool","threads"],"created_at":"2025-10-09T18:54:47.810Z","updated_at":"2025-10-09T18:54:54.572Z","avatar_url":"https://github.com/brendanddev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom Thread Pool\n\nA custom thread pool implementation in Java, built from scratch to explore and understand the **internal workings of thread pools**. This project focuses on implementing the core mechanisms manually, rather than relying on Java’s built-in concurrency utilities.\n\n---\n\n## Features\n\n- **Custom TaskQueue** – A thread-safe FIFO queue implemented from scratch using `synchronized`, `wait()`, and `notifyAll()`.\n- **WorkerThread Management** – Multiple worker threads continuously dequeue and execute tasks.  \n- **Graceful Shutdown** – Supports a clean shutdown where queued tasks are completed using the **poison pill pattern**.\n- **Immediate Shutdown** – Can stop all active tasks and return unexecuted tasks immediately.\n- **Exception Handling** – Worker threads catch exceptions from tasks to prevent thread death.\n\n---\n\n### References \u0026 Inspiration\n- [Java Concurrency Tutorial](https://docs.oracle.com/javase/tutorial/essential/concurrency/)\n- [Baeldung: Building Thread Pools](https://www.baeldung.com/thread-pool-java-and-guava)\n- [Poison Pill Pattern](https://java-design-patterns.com/patterns/poison-pill/)\n- [Thread Pool Policies](https://medium.com/@ankithahjpgowda/policies-of-threadpoolexecutor-in-java-75f22fd6f637)\n- [ava Thread Pool Execution and Rejection Policies](https://medium.com/@umeshcapg/understanding-java-thread-pool-execution-and-rejection-policies-b97eeb58094a)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanddev%2Fcustom-thread-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrendanddev%2Fcustom-thread-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanddev%2Fcustom-thread-pool/lists"}