diff --git a/Cargo.toml b/Cargo.toml index 63fb72a..17910df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,7 @@ bevy_mod_picking = "0.17" [dependencies.bevy] version = "0.12" default-features = false +features = ["multi-threaded"] [dev-dependencies.bevy] version = "0.12" diff --git a/src/input.rs b/src/input.rs index bdca0eb..cb10c2b 100644 --- a/src/input.rs +++ b/src/input.rs @@ -173,17 +173,14 @@ fn setup(mut commands: Commands, settings: Res) { let (m_sender, m_receiver) = crossbeam_channel::unbounded::(); let (r_sender, r_receiver) = crossbeam_channel::unbounded::(); - //Got issues with the taskpool rewrite : https://github.com/bevyengine/bevy/pull/10008 let thread_pool = IoTaskPool::get(); thread_pool - .spawn({ - MidiInputTask { - receiver: m_receiver, - sender: r_sender, - settings: settings.clone(), - input: None, - connection: None, - } + .spawn(MidiInputTask { + receiver: m_receiver, + sender: r_sender, + settings: settings.clone(), + input: None, + connection: None, }) .detach(); diff --git a/src/output.rs b/src/output.rs index 035a72c..3d49568 100644 --- a/src/output.rs +++ b/src/output.rs @@ -136,7 +136,6 @@ fn setup(mut commands: Commands, settings: Res) { let (m_sender, m_receiver) = crossbeam_channel::unbounded(); let (r_sender, r_receiver) = crossbeam_channel::unbounded(); - //Got issues with the taskpool rewrite : https://github.com/bevyengine/bevy/pull/10008 let thread_pool = IoTaskPool::get(); thread_pool .spawn(MidiOutputTask {