From 61dfcf1ba2049bf0375821652e49b0e4c4147623 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 29 Mar 2024 14:20:21 +0100 Subject: feat(ecs): make World unwind safe --- ecs/src/actions.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ecs/src/actions.rs') diff --git a/ecs/src/actions.rs b/ecs/src/actions.rs index edfee55..4507e71 100644 --- a/ecs/src/actions.rs +++ b/ecs/src/actions.rs @@ -19,7 +19,8 @@ impl<'world> Actions<'world> { self.world_data .action_queue - .borrow_mut() + .write_nonblock() + .expect("Failed to aquire read-write action queue lock") .push(Action::Spawn(components.into_vec())); } } -- cgit v1.2.3-18-g5258