|
35 | 35 | causal_type: CausaloidType, |
36 | 36 | causal_fn: Option<CausalFn>, |
37 | 37 | context_causal_fn: Option<ContextualCausalFn<D, S, T, ST, SYM, VS, VT>>, |
38 | | - context: Option<Arc<Context<D, S, T, ST, SYM, VS, VT>>>, |
| 38 | + context: Option<Arc<RwLock<Context<D, S, T, ST, SYM, VS, VT>>>>, |
39 | 39 | // The last calculated effect of this causaloid. It's an Option because a |
40 | 40 | // causaloid may not have been evaluated yet. |
41 | 41 | effect: ArcRWLock<Option<PropagatingEffect>>, |
|
90 | 90 | pub fn new_with_context( |
91 | 91 | id: IdentificationValue, |
92 | 92 | context_causal_fn: ContextualCausalFn<D, S, T, ST, SYM, VS, VT>, |
93 | | - context: Arc<Context<D, S, T, ST, SYM, VS, VT>>, |
| 93 | + context: Arc<RwLock<Context<D, S, T, ST, SYM, VS, VT>>>, |
94 | 94 | description: &str, |
95 | 95 | ) -> Self { |
96 | 96 | Causaloid { |
@@ -140,7 +140,7 @@ where |
140 | 140 | pub fn from_causal_collection_with_context( |
141 | 141 | id: IdentificationValue, |
142 | 142 | causal_coll: Arc<Vec<Causaloid<D, S, T, ST, SYM, VS, VT>>>, |
143 | | - context: Arc<Context<D, S, T, ST, SYM, VS, VT>>, |
| 143 | + context: Arc<RwLock<Context<D, S, T, ST, SYM, VS, VT>>>, |
144 | 144 | description: &str, |
145 | 145 | ) -> Self { |
146 | 146 | Causaloid { |
@@ -190,7 +190,7 @@ where |
190 | 190 | pub fn from_causal_graph_with_context( |
191 | 191 | id: IdentificationValue, |
192 | 192 | causal_graph: Arc<CausaloidGraph<Causaloid<D, S, T, ST, SYM, VS, VT>>>, |
193 | | - context: Arc<Context<D, S, T, ST, SYM, VS, VT>>, |
| 193 | + context: Arc<RwLock<Context<D, S, T, ST, SYM, VS, VT>>>, |
194 | 194 | description: &str, |
195 | 195 | ) -> Self { |
196 | 196 | Causaloid { |
|
0 commit comments