{"id":19365804,"url":"https://github.com/xermicus/poolparty","last_synced_at":"2026-05-29T16:31:40.346Z","repository":{"id":57657185,"uuid":"243192441","full_name":"xermicus/poolparty","owner":"xermicus","description":"Manage the default rust futures threadpool executor","archived":false,"fork":false,"pushed_at":"2021-10-13T12:34:44.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-20T23:24:04.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xermicus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-26T07:08:44.000Z","updated_at":"2021-10-13T12:33:48.000Z","dependencies_parsed_at":"2022-08-26T05:20:48.555Z","dependency_job_id":null,"html_url":"https://github.com/xermicus/poolparty","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/xermicus/poolparty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xermicus%2Fpoolparty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xermicus%2Fpoolparty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xermicus%2Fpoolparty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xermicus%2Fpoolparty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xermicus","download_url":"https://codeload.github.com/xermicus/poolparty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xermicus%2Fpoolparty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33662205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":[],"created_at":"2024-11-10T07:42:30.395Z","updated_at":"2026-05-29T16:31:40.330Z","avatar_url":"https://github.com/xermicus.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Cargo](https://img.shields.io/crates/v/poolparty.svg)](https://crates.io/crates/poolparty)\n[![Documentation](https://docs.rs/poolparty/badge.svg)](https://docs.rs/poolparty)\n\nTiny crate providing added functionality to the futures-rs threadpool executor.\nThe `futures::future::ThreadPool` executor currently has no way built in to handle panics, manually stop the pool execution or bubble up errors back to the caller.\nThe crate works around these limitations (it might get obsolete once [this open issue will be resolved](https://github.com/rust-lang/futures-rs/issues/1468)).\n\nUse cases for the crate are:\n* Stop executing futures in case any of future that runs on it faces an unrecoverable error and returns an Err().\n* Let the caller handle the error.\n* Stop the threadpool and its spawned tasks on user request.\n\n⚠ This crate is beeing passively maintained. It works just fine for me in an existing project. However I'll be using [smol](https://crates.io/crates/smol) as my futures executor in new projects. The `smol` task handles offer the same functionality (and more), rendering this crate obsolete.\n\n# Usage\n\nThe following example demonstrates the handling of a failing task:\n```rust\nasync fn forever() -\u003e Result\u003c(),String\u003e {\n    loop {}\n}\n\nasync fn fail(msg: String) -\u003e Result\u003c(),String\u003e {\n    Err(msg)\n}\n\nlet mut pool = StoppableThreadPool::new()?;\nlet err = \"fail_function_called\".to_string();\npool.spawn(fail(err.clone()));\npool.spawn(forever());\n\nassert_eq!(\n    pool.observe().await.unwrap_err(),\n    err\n)\n```\n\nHave a look at the tests in [lib.rs](https://github.com/xermicus/poolparty/blob/master/src/lib.rs#L114) for more usage examples.\n\n# License\n\nThis project is licensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or\n   http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in poolparty by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxermicus%2Fpoolparty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxermicus%2Fpoolparty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxermicus%2Fpoolparty/lists"}