summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
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")