]> git.proxmox.com Git - debcargo-conf.git/commitdiff
rayon-core - fix tests on 32-bit.
authorPeter Michael Green <plugwash@debian.org>
Sat, 9 Dec 2023 13:40:48 +0000 (13:40 +0000)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 18 Dec 2023 09:20:45 +0000 (10:20 +0100)
(cherry picked from commit 56ab31704ee1439e4ac7b922637815f8d84fd855)

src/rayon-core/debian/changelog
src/rayon-core/debian/patches/constrain-thread-count.patch

index 4b51704469217a6e4242471f62ac3cfe9179c5a9..8adf194e56e732cfe695b477c39575495b510519 100644 (file)
@@ -1,3 +1,13 @@
+rust-rayon-core (1.12.0-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
+
+  * Team upload.
+  * Package rayon-core 1.12.0 from crates.io using debcargo 2.6.1
+  * Switch from num_cpus::get() > 8 to  std::thread::available_parallelism()
+    in constrain-thread-count.patch following upstream change. This should
+    fix build failure of tests on 32-bit architectures.
+
+ -- Peter Michael Green <plugwash@debian.org>  Sat, 9 Dec 2023 13:38:42 +0000
+
 rust-rayon-core (1.12.0-1) unstable; urgency=medium
 
   * Team upload.
index 04be16516f607c4ee4e0a73cd73c35783d13d8c0..c6e47227bec87e4efa3bb736aadfdf80e01108c8 100644 (file)
@@ -8,7 +8,7 @@ Index: rayon-core/tests/stack_overflow_crash.rs
 +    let mut poolbuilder = ThreadPoolBuilder::new()
 +        .stack_size(stack_size_in_mb * 1024 * 1024);
 +    #[cfg(target_pointer_width = "32")]
-+    if num_cpus::get() > 8 {
++    if std::thread::available_parallelism().map(|n| n.get()).unwrap_or(1) > 8 {
 +        poolbuilder = poolbuilder.num_threads(8);
 +    }
 +    let pool = poolbuilder