rework some threading code with the ui

This commit is contained in:
rezural
2020-12-24 21:42:46 +11:00
parent 31032ab969
commit 5fce09cb52
3 changed files with 12 additions and 7 deletions

View File

@@ -10,6 +10,8 @@ pub mod plugin;
pub struct RunState {
#[cfg(feature = "parallel")]
pub thread_pool: rapier::rayon::ThreadPool,
#[cfg(feature = "parallel")]
pub num_threads: usize,
pub timestep_id: usize,
pub time: f32,
}
@@ -28,6 +30,8 @@ impl RunState {
Self {
#[cfg(feature = "parallel")]
thread_pool: thread_pool,
#[cfg(feature = "parallel")]
num_threads,
timestep_id: 0,
time: 0.0,
}