Crate son_of_grid_engine [−] [src]
This crate allows for easy detection of the cluster environment.
extern crate son_of_grid_engine as sge; use std::thread::spawn; let cluster = sge::discover(); let (tx, rx) = std::sync::mpsc::channel(); for i in 0..cluster.available_cpus() { let tx = tx.clone(); spawn(move || { tx.send(i).expect("channel is still aroun"); }); } drop(tx); assert_eq!( (0..cluster.available_cpus()).sum::<usize>(), rx.iter().sum() );
Structs
SystemInfo |
Enums
JobType | |
NetworkInfo |
Functions
discover |