proxide-parallel-rt 0.1.0-alpha.10

Minimal parallel runtime: thread-count registry for wasm32 builds
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 3.41 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 241.17 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • maraxen/proxide
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • maraxen

proxide-parallel-rt

Alpha — experimental, no API stability guarantees. This crate is part of an active research project; APIs may change without notice between versions. Not recommended for production use.

Minimal parallel runtime: thread-count registry for wasm32 builds

Part of the proxide workspace.

Overview

proxide-parallel-rt is a tiny shim that provides a global thread-count registry via a process-wide atomic variable. It exists so that code which needs to know how many worker threads are available (e.g. rayon-like parallelism) can query a single canonical source without pulling in a full threading runtime, making it compatible with wasm32 targets where real thread pools are unavailable.

Usage

// At program startup, register the number of worker threads:
proxide_parallel_rt::set_num_threads(rayon::current_num_threads());

// Anywhere in the crate tree, retrieve the configured parallelism count:
let n = proxide_parallel_rt::num_threads();