Lines Matching refs:Arc
7 use std::sync::Arc;
15 type ProviderFnBox = Box<dyn Fn(Arc<Registry>) -> Pin<ProviderFutureBox> + Send + Sync>;
30 providers: Arc<Mutex<HashMap<TypeId, Provider>>>,
31 instances: Arc<Mutex<HashMap<TypeId, InstanceBox>>>,
32 start_order: Arc<Mutex<Vec<Box<dyn Stoppable + Send + Sync>>>>,
37 f: Arc<ProviderFnBox>,
62 self.providers.insert(TypeId::of::<T>(), Provider { f: Arc::new(f) }); in register_provider()
70 providers: Arc::new(Mutex::new(self.providers)), in build()
71 instances: Arc::new(Mutex::new(HashMap::new())), in build()
72 start_order: Arc::new(Mutex::new(Vec::new())), in build()
79 pub async fn get<T: 'static + Clone + Send + Sync + Stoppable>(self: &Arc<Self>) -> T { in get()
104 pub async fn inject<T: 'static + Clone + Send + Sync>(self: &Arc<Self>, obj: T) { in inject()
110 pub async fn stop_all(self: &Arc<Self>) { in stop_all()
119 impl<T> Stoppable for std::sync::Arc<T> {} implementation