{"id":17325684,"url":"https://github.com/sagebind/threadfin","last_synced_at":"2025-04-14T00:01:21.603Z","repository":{"id":40459749,"uuid":"388622089","full_name":"sagebind/threadfin","owner":"sagebind","description":"A thread pool for running multiple tasks on a configurable group of threads.","archived":false,"fork":false,"pushed_at":"2023-11-22T23:18:38.000Z","size":56,"stargazers_count":50,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T06:13:15.559Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.rs/threadfin/","language":"Rust","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/sagebind.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":"2021-07-22T23:16:09.000Z","updated_at":"2025-03-27T18:57:51.000Z","dependencies_parsed_at":"2024-11-01T00:01:51.526Z","dependency_job_id":"1ede45ff-125c-4ce6-8a80-f208b491e4c1","html_url":"https://github.com/sagebind/threadfin","commit_stats":{"total_commits":43,"total_committers":3,"mean_commits":"14.333333333333334","dds":0.06976744186046513,"last_synced_commit":"052113009e7a515a40a8d7c13cfae3465ec49562"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagebind%2Fthreadfin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagebind%2Fthreadfin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagebind%2Fthreadfin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagebind%2Fthreadfin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sagebind","download_url":"https://codeload.github.com/sagebind/threadfin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799931,"owners_count":21163403,"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":[],"created_at":"2024-10-15T14:14:04.433Z","updated_at":"2025-04-14T00:01:21.542Z","avatar_url":"https://github.com/sagebind.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Threadfin\n\nA thread pool for running multiple tasks on a configurable group of threads.\n\n[![Crates.io](https://img.shields.io/crates/v/threadfin.svg)](https://crates.io/crates/threadfin)\n[![Documentation](https://docs.rs/threadfin/badge.svg)](https://docs.rs/threadfin)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.51+-yellow.svg)](#minimum-supported-rust-version)\n[![Build](https://github.com/sagebind/threadfin/workflows/ci/badge.svg)](https://github.com/sagebind/threadfin/actions)\n\nExtra features:\n\n- Dynamic pool size based on load\n- Support for async tasks\n- Tasks return a handle which can be joined or awaited for the return value\n- Optional common process-wide thread pool\n\n## Async support\n\nThreadfin supports asynchronous usage via futures, and allows you to mix and match both synchronous and asynchronous tasks within a single thread pool.\n\n## Examples\n\n```rust\n// Create a new pool.\nlet pool = threadfin::builder().size(8).build();\n\n// Schedule some work.\nlet compute_task = pool.execute(|| {\n    // Some expensive computation\n    2 + 2\n});\n\n// Do something in the meantime.\nprintln!(\"Waiting for result...\");\n\n// Wait for the task to complete and get the result.\nlet sum = compute_task.join();\nprintln!(\"Sum: 2 + 2 = {}\", sum);\n```\n\n## Installation\n\nInstall via Cargo by adding to your Cargo.toml file:\n\n```toml\n[dependencies]\nthreadfin = \"0.1\"\n```\n\n### Minimum supported Rust version\n\nThe minimum supported Rust version (or MSRV) for Threadfin is stable Rust 1.46 or greater, meaning we only guarantee that Threadfin will compile if you use a rustc version of at least 1.46. It might compile with older versions but that could change at any time.\n\nThis version is explicitly tested in CI and may only be bumped in new minor versions. Any changes to the supported minimum version will be called out in the release notes.\n\n## Other libraries\n\n- [threadpool](https://github.com/rust-threadpool/rust-threadpool)\n- [scoped_threadpool](https://github.com/kimundi/scoped-threadpool-rs)\n- [rusty_pool](https://github.com/robinfriedli/rusty_pool)\n- [rayon](https://github.com/rayon-rs/rayon)\n\n## Sponsors\n\nSpecial thanks to sponsors of my open-source work!\n\n\u003c!-- sponsors --\u003e\u003ca href=\"https://github.com/da-moon\"\u003e\u003cimg src=\"https://github.com/da-moon.png\" width=\"60px\" alt=\"da-moon\" /\u003e\u003c/a\u003e\u003c!-- sponsors --\u003e\n\n## License\n\nLicensed under the MIT license. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagebind%2Fthreadfin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagebind%2Fthreadfin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagebind%2Fthreadfin/lists"}