From 44b6397a58c6c5bc2cc45646667f0fc389c54f37 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 2 Sep 2019 15:15:11 +0300 Subject: gnu: Add rust-scoped-threadpool. * gnu/packages/crates-io.scm (rust-scoped-threadpool): New variable. --- gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index a4d2e17524..410279255b 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -1603,6 +1603,34 @@ (define-public rust-schannel server functionality.") (license license:expat))) +(define-public rust-scoped-threadpool + (package + (name "rust-scoped-threadpool") + (version "0.1.9") + (source + (origin + (method url-fetch) + (uri (crate-uri "scoped_threadpool" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1a26d3lk40s9mrf4imhbik7caahmw2jryhhb6vqv6fplbbgzal8x")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-development-inputs + (("rust-lazy-static" ,rust-lazy-static)))) + (home-page "https://github.com/Kimundi/scoped-threadpool-rs") + (synopsis "library for scoped and cached threadpools") + (description + "This crate provides a stable, safe and scoped threadpool. It can be used +to execute a number of short-lived jobs in parallel without the need to respawn +the underlying threads. Jobs are runnable by borrowing the pool for a given +scope, during which an arbitrary number of them can be executed. These jobs can +access data of any lifetime outside of the pools scope, which allows working on +non-'static references in parallel.") + (license (list license:asl2.0 + license:expat)))) + (define-public rust-scoped-tls (package (name "rust-scoped-tls") -- cgit v1.2.3