From 88e82da4f9ea80c3a1fd0afae4dc3faaaf469201 Mon Sep 17 00:00:00 2001 From: Mikkel Rasmussen Date: Sat, 11 Nov 2023 15:26:25 +0100 Subject: [PATCH] Removed unused init --- src/input.rs | 3 +-- src/output.rs | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) 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,