many_cpus

Crates.iomany_cpus
lib.rsmany_cpus
version0.3.18
created_at2025-03-08 05:35:17.179429+00
updated_at2025-08-22 09:26:02.904918+00
descriptionEfficiently schedule work and inspect the hardware environment on many-processor systems
homepage
repositoryhttps://github.com/folo-rs/folo
max_upload_size
id1584106
size414,315
Sander Saares (sandersaares)

documentation

README

Efficiently schedule work and inspect the hardware environment on many-processor systems.

On systems with 100+ logical processors, taking direct control over work placement can yield superior performance by ensuring data locality and avoiding expensive cross-processor transfers.

use many_cpus::ProcessorSet;

let threads = ProcessorSet::default().spawn_threads(|processor| {
    println!("Spawned thread on processor {}", processor.id());

    // In a real service, you would start some work handler here, e.g. to read
    // and process messages from a channel or to spawn a web handler.
});

More details in the package documentation.

This is part of the Folo project that provides mechanisms for high-performance hardware-aware programming in Rust.

Commit count: 810

cargo fmt