Skip to content

Commit

Permalink
fix: init NonSendRes
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianSpeitel committed Jan 26, 2024
1 parent 8c6afdb commit fdb9837
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,21 @@ impl bevy_app::Plugin for IRCPlugin {
fn build(&self, app: &mut bevy_app::App) {
use bevy_app::Update;

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

app.add_event::<MessageEvent>();
app.add_systems(Update, connect);
app.add_systems(Update, finish_connect);
app.add_systems(Update, identify);
app.add_systems(Update, join_and_part);
app.add_systems(Update, capabilities);
app.add_systems(Update, receive);
app.add_systems(Update, main_thread_system);
}
}

fn main_thread_system(_: NonSend<()>) {
#[derive(Resource)]
struct NonSendRes;
fn main_thread_system(_: NonSend<NonSendRes>) {
bevy_tasks::tick_global_task_pools_on_main_thread();
}

0 comments on commit fdb9837

Please sign in to comment.