rayon-join

Crates.iorayon-join
lib.rsrayon-join
version1.11.0
created_at2025-09-08 19:14:21.660759+00
updated_at2025-09-09 13:36:36.444443+00
descriptionSimple macro to call join from rayon with more than 2 arguments.
homepage
repositoryhttps://github.com/dawae54/rayon-join
max_upload_size
id1829755
size6,178
Alvaro Berenguer Cobo (dawae54)

documentation

https://docs.rs/rayon-join

README

rayon-join

Simple macro to call join from rayon with more than 2 arguments.

Installation

cargo add rayon-join

Usage

You can pass any number of closures:

 rayon_join::join!(|| { /* task 1 */ }, || { /* task 2 */ }, || { /* task 3 */ });

You can also pass functions:

fn task1() { /* ... */ }
fn task2() { /* ... */ }
fn task3() { /* ... */ }
rayon_join::join!(task1, task2, task3);

If you need to pass arguments to the functions, use a closure:

fn task_with_arg(x: i32) { /* ... */ }
rayon_join::join!(|| task_with_arg(42), || task_with_arg(7));
Commit count: 10

cargo fmt