{"id":19438940,"url":"https://github.com/spacejam/rust-futurepool","last_synced_at":"2025-07-25T22:35:51.758Z","repository":{"id":26065431,"uuid":"29509079","full_name":"spacejam/rust-futurepool","owner":"spacejam","description":"simple future pool library for predictable concurrency","archived":false,"fork":false,"pushed_at":"2015-01-20T06:24:33.000Z","size":116,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T07:23:10.929Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacejam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-20T03:05:08.000Z","updated_at":"2017-08-29T21:16:52.000Z","dependencies_parsed_at":"2022-08-24T14:56:52.542Z","dependency_job_id":null,"html_url":"https://github.com/spacejam/rust-futurepool","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/spacejam%2Frust-futurepool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacejam%2Frust-futurepool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacejam%2Frust-futurepool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacejam%2Frust-futurepool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacejam","download_url":"https://codeload.github.com/spacejam/rust-futurepool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238989771,"owners_count":19564134,"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-11-10T15:20:19.260Z","updated_at":"2025-02-25T07:18:00.981Z","avatar_url":"https://github.com/spacejam.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[WIP] FuturePool\n============\nTiny future pool library.\n```rust\nextern crate futurepool;\nuse futurepool::FuturePool;\n\nfn server() {\n    let fp = FuturePool::new(std::os::num_cpus() / 4);\n    ...\n    for req in some_acceptor.iter() {\n        // This creates 2 tasks in the future pool\n        // to be executed asynchronously:\n        //     1. execute the handler\n        //     2. respond to the request when #1 is complete\n        // If either step fails, any on_failure calls will be\n        // executed sequentially.\n        fp.execute(|\u0026:| -\u003e Rep {\n            user_supplied_handler(req);\n        }).map(|\u0026: rep: Rep| {\n            req.respond(rep);\n        }).on_failure(|\u0026: error: Err\u003cString\u003e| {\n            println!(\"failed to process OR respond: {}\", error);\n        });\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacejam%2Frust-futurepool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacejam%2Frust-futurepool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacejam%2Frust-futurepool/lists"}