Avoid to use Arc for not Send/Sync reference
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 10m8s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 10m8s
This commit is contained in:
parent
1568223b9d
commit
1aa2dcc55d
3 changed files with 16 additions and 12 deletions
|
@ -1,4 +1,7 @@
|
|||
use std::sync::{Arc, RwLock};
|
||||
use std::{
|
||||
rc::Rc,
|
||||
sync::{Arc, RwLock},
|
||||
};
|
||||
|
||||
use egui_winit_vulkano::Gui;
|
||||
use vulkano::{
|
||||
|
@ -35,19 +38,19 @@ pub struct ApplicationContext {
|
|||
pub window_id: WindowId,
|
||||
|
||||
// Données mutables partagées avec Arc<Mutex<>>
|
||||
pub vulkano_windows: Arc<RwLock<VulkanoWindows>>,
|
||||
pub vulkano_windows: Rc<RwLock<VulkanoWindows>>,
|
||||
pub input_manager: Arc<RwLock<InputManager>>,
|
||||
pub timer: Arc<RwLock<Timer>>,
|
||||
pub gui: Arc<RwLock<Gui>>,
|
||||
pub gui: Rc<RwLock<Gui>>,
|
||||
}
|
||||
|
||||
impl ApplicationContext {
|
||||
pub fn new(
|
||||
vulkan_context: Arc<VulkanContext>,
|
||||
vulkano_windows: Arc<RwLock<VulkanoWindows>>,
|
||||
vulkano_windows: Rc<RwLock<VulkanoWindows>>,
|
||||
input_manager: Arc<RwLock<InputManager>>,
|
||||
timer: Arc<RwLock<Timer>>,
|
||||
gui: Arc<RwLock<Gui>>,
|
||||
gui: Rc<RwLock<Gui>>,
|
||||
event_loop_proxy: EventLoopProxy<UserEvent>,
|
||||
window_id: WindowId,
|
||||
) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue