Struct son_of_grid_engine::SystemInfo
[−]
[src]
pub struct SystemInfo { pub scratch_path: PathBuf, pub queue_name: String, pub job_id: usize, pub job_type: JobType, pub networking: NetworkInfo, // some fields omitted }
Fields
scratch_path: PathBuf
queue_name: String
job_id: usize
job_type: JobType
networking: NetworkInfo
Methods
impl SystemInfo
[src]
fn is_multicore(&self) -> bool
[src]
fn available_cpus(&self) -> usize
[src]
Fallback to detectable cpus
fn get_pinned_threadpool(&self) -> ThreadPool
[src]
Get a ThreadPool with the workers already pinned to the available cpus
extern crate son_of_grid_engine as sge; let info = sge::discover(); let pool = info.get_pinned_threadpool(); for i in 0..128 { pool.execute(move || { println!("{}", i); }); }