fixed volatile issues with merge
This commit is contained in:
@ -57,7 +57,7 @@ pub fn jspg_setup(database: Json) -> Json {
|
||||
Json(serde_json::to_value(drop).unwrap())
|
||||
}
|
||||
|
||||
#[cfg_attr(not(test), pg_extern)]
|
||||
#[cfg_attr(not(test), pg_extern(volatile))]
|
||||
pub fn jspg_merge(schema_id: &str, data: JsonB) -> JsonB {
|
||||
// Try to acquire a read lock to get a clone of the Engine Arc
|
||||
let engine_opt = {
|
||||
@ -74,7 +74,7 @@ pub fn jspg_merge(schema_id: &str, data: JsonB) -> JsonB {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(not(test), pg_extern)]
|
||||
#[cfg_attr(not(test), pg_extern(volatile))]
|
||||
pub fn jspg_merge_ordered(schema_id: &str, data: Json) -> Json {
|
||||
let engine_opt = {
|
||||
let lock = GLOBAL_JSPG.read().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user