diff --git a/src/input.rs b/src/input.rs index ab15d81..1779ba9 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1,6 +1,5 @@ use super::{MidiMessage, KEY_RANGE}; use bevy::prelude::Plugin; -use bevy::tasks::TaskPool; use bevy::{prelude::*, tasks::IoTaskPool}; use crossbeam_channel::{Receiver, Sender}; use midir::ConnectErrorKind; // XXX: do we expose this? @@ -175,7 +174,7 @@ fn setup(mut commands: Commands, settings: Res) { 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_or_init(TaskPool::new); + let thread_pool = IoTaskPool::get(); thread_pool.spawn({ MidiInputTask { receiver: m_receiver, diff --git a/src/output.rs b/src/output.rs index bd9306d..035a72c 100644 --- a/src/output.rs +++ b/src/output.rs @@ -1,6 +1,6 @@ use super::MidiMessage; -use bevy::tasks::TaskPool; -use bevy::{prelude::*, tasks::IoTaskPool}; +use bevy::prelude::*; +use bevy::tasks::IoTaskPool; use crossbeam_channel::{Receiver, Sender}; use midir::ConnectErrorKind; pub use midir::MidiOutputPort; @@ -137,7 +137,7 @@ fn setup(mut commands: Commands, settings: Res) { 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_or_init(TaskPool::new); + let thread_pool = IoTaskPool::get(); thread_pool .spawn(MidiOutputTask { receiver: m_receiver,