Skip to content

Commit

Permalink
fix: init all task pools
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianSpeitel committed Jan 26, 2024
1 parent 36138da commit 95d1fdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::sync::{Arc, Mutex};

use async_compat::Compat;
use bevy_ecs::prelude::*;
use bevy_tasks::AsyncComputeTaskPool;
use bevy_tasks::{AsyncComputeTaskPool, ComputeTaskPool, IoTaskPool};
use futures_lite::{future, StreamExt};
pub use irc;
use irc::client::prelude::*;
Expand Down Expand Up @@ -317,7 +317,10 @@ impl bevy_app::Plugin for IRCPlugin {
fn build(&self, app: &mut bevy_app::App) {
use bevy_app::Update;

ComputeTaskPool::get_or_init(Default::default);
AsyncComputeTaskPool::get_or_init(Default::default);
IoTaskPool::get_or_init(Default::default);

app.insert_non_send_resource(NonSendRes);
app.add_systems(Update, main_thread_system);

Expand Down

0 comments on commit 95d1fdd

Please sign in to comment.