Skip to content

Commit

Permalink
Avoid taking a lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Besancon committed Dec 19, 2024
1 parent 7cdcbac commit b1c8da3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions massa-execution-worker/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,16 @@ impl ExecutionState {
})));

// Create an empty placeholder execution context, with shared atomic access
let execution_context = Arc::new(Mutex::new(ExecutionContext::new(
let unwrapped_execution_context = ExecutionContext::new(
config.clone(),
final_state.clone(),
active_history.clone(),
module_cache.clone(),
mip_store.clone(),
execution_trail_hash,
)));

let cur_execution_version = execution_context.lock().execution_component_version;
);
let cur_execution_version = unwrapped_execution_context.execution_component_version;
let execution_context = Arc::new(Mutex::new(unwrapped_execution_context));

// Instantiate the interface providing ABI access to the VM, share the execution context with it
let execution_interface = Box::new(InterfaceImpl::new(
Expand Down

0 comments on commit b1c8da3

Please sign in to comment.