aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-09-02 15:15:11 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-09-02 15:54:58 +0300
commit44b6397a58c6c5bc2cc45646667f0fc389c54f37 (patch)
treeed4b3d9febc45400a0782c84a0af0eaaeead7759 /gnu
parent76ee4446fdb214a35972848544b09ea555931a30 (diff)
downloadpatches-44b6397a58c6c5bc2cc45646667f0fc389c54f37.tar
patches-44b6397a58c6c5bc2cc45646667f0fc389c54f37.tar.gz
gnu: Add rust-scoped-threadpool.
* gnu/packages/crates-io.scm (rust-scoped-threadpool): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/crates-io.scm28
1 files changed, 28 insertions, 0 deletions
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 @@ paths point to the same file.")
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")