-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
area: libraryImprovements to the library API qualityImprovements to the library API qualitytype: featureNew feature or requestNew feature or request
Milestone
Description
Is it possible to add feature to replace Rc in inner structures to Arc to use in async context?
pub struct RateLimitBodyJsonPath {
pub jsonpath: Vec<RsonpathEngine>
}error[E0277]: `Rc<StringPattern>` cannot be shared between threads safely
--> core/src/rule/mod.rs:339:21
|
339 | / tokio::spawn(async move {
340 | | let mut guard = RULES.write().await;
341 | | guard.remove(tenant_clone.as_str());
342 | | });
| |______________________^ `Rc<StringPattern>` cannot be shared between threads safely
|
= help: within `[(Rc<StringPattern>, rsonpath::automaton::State); 2]`, the trait `Sync` is not implemented for `Rc<StringPattern>`, which is required by `{async block@core/src/rule/mod.rs:339:34: 339:44}: Send`
= note: required because it appears within the type `(Rc<StringPattern>, rsonpath::automaton::State)`
= note: required because it appears within the type `[(Rc<StringPattern>, rsonpath::automaton::State); 2]`
= note: required for `smallvec::SmallVecData<[(Rc<StringPattern>, rsonpath::automaton::State); 2]>` to implement `Sync`
Metadata
Metadata
Assignees
Labels
area: libraryImprovements to the library API qualityImprovements to the library API qualitytype: featureNew feature or requestNew feature or request
Type
Projects
Status
Merged