Commit 0972cd9
authored
chore: refactor to move Arc<RwLock> concern outside exec_policy_for (#7615)
The caller should decide whether wrapping the policy in `Arc<RwLock>` is
necessary. This should make #7609 a
bit smoother.
- `exec_policy_for()` -> `load_exec_policy_for_features()`
- introduce `load_exec_policy()` that does not take `Features` as an arg
- both return `Result<Policy, ExecPolicyError>` instead of
Result<Arc<RwLock<Policy>>, ExecPolicyError>`
This simplifies the tests as they have no need for `Arc<RwLock>`.1 parent 28dcdb5 commit 0972cd9
2 files changed
+17
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
| 85 | + | |
83 | 86 | | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
105 | | - | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| |||
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
309 | | - | |
| 313 | + | |
310 | 314 | | |
311 | 315 | | |
312 | 316 | | |
| |||
319 | 323 | | |
320 | 324 | | |
321 | 325 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| |||
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 366 | + | |
369 | 367 | | |
370 | 368 | | |
371 | 369 | | |
| |||
378 | 376 | | |
379 | 377 | | |
380 | 378 | | |
381 | | - | |
| 379 | + | |
382 | 380 | | |
383 | 381 | | |
384 | 382 | | |
| |||
390 | 388 | | |
391 | 389 | | |
392 | 390 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 391 | + | |
397 | 392 | | |
398 | 393 | | |
399 | 394 | | |
| |||
0 commit comments