pub fn start_execution(
        sandbox_manager: &Arc<SandboxManager>,
        exec_id: ExecId,
        wasm_id: WasmId,
        wasm_memory_id: MemoryId,
        stable_memory_id: MemoryId,
        exec_input: SandboxExecInput,
    ) {
        let total_timer = std::time::Instant::now();
        let mut guard = sandbox_manager.repr.lock().unwrap();
        let wasm_runner = guard.canister_wasms.get(&wasm_id).unwrap_or_else(|| {
            unreachable!(
                "Failed to open exec session {}: wasm {} not found",
                exec_id, wasm_id
            )
        });
        let wasm_memory = guard.memories.get(&wasm_memory_id).unwrap_or_else(|| {
            unreachable!(
                "Failed to open exec session {}: wasm memory {} not found",
                exec_id, wasm_memory_id,
            )
        });
        let stable_memory = guard.memories.get(&stable_memory_id).unwrap_or_else(|| {
            unreachable!(
                "Failed to open exec session {}: stable memory {} not found",
                exec_id, stable_memory_id,
            )
        });
        match exec_input.execution_parameters.execution_mode {
            ExecutionMode::Replicated => Execution::start_on_worker_thread(
                exec_id,
                Arc::clone(wasm_runner),
                Arc::clone(wasm_memory),
                Arc::clone(stable_memory),
                Arc::clone(sandbox_manager),
                &mut guard.workers_for_replicated_execution,
                exec_input,
                total_timer,
            ),
            ExecutionMode::NonReplicated => Execution::start_on_worker_thread(
                exec_id,
                Arc::clone(wasm_runner),
                Arc::clone(wasm_memory),
                Arc::clone(stable_memory),
                Arc::clone(sandbox_manager),
                &mut guard.workers_for_non_replicated_execution,
                exec_input,
                total_timer,
            ),
        };
    }
/// Starts Wasm execution using specific code and state, passing
/// execution input.
///
/// Note that inside here we start a transaction and the state of
/// execution can not and does not change while we are processing
/// this particular session.
Starts Wasm execution using specific code and state, passing
execution input.

Note that inside here we start a transaction and the state of
execution can not and does not change while we are processing
this particular session.
Starts Wasm execution using specific code and state passing execution input . Note that inside here we start a transaction and the state of execution can not and does not change while we are processing this particular session .
pub fn start_execution(
        sandbox_manager: &Arc<SandboxManager>,
        exec_id: ExecId,
        wasm_id: WasmId,
        wasm_memory_id: MemoryId,
        stable_memory_id: MemoryId,
        exec_input: SandboxExecInput,
    ) {
        let total_timer = std::time::Instant::now();
        let mut guard = sandbox_manager.repr.lock().unwrap();
        let wasm_runner = guard.canister_wasms.get(&wasm_id).unwrap_or_else(|| {
            unreachable!(
                "Failed to open exec session {}: wasm {} not found",
                exec_id, wasm_id
            )
        });
        let wasm_memory = guard.memories.get(&wasm_memory_id).unwrap_or_else(|| {
            unreachable!(
                "Failed to open exec session {}: wasm memory {} not found",
                exec_id, wasm_memory_id,
            )
        });
        let stable_memory = guard.memories.get(&stable_memory_id).unwrap_or_else(|| {
            unreachable!(
                "Failed to open exec session {}: stable memory {} not found",
                exec_id, stable_memory_id,
            )
        });
        match exec_input.execution_parameters.execution_mode {
            ExecutionMode::Replicated => Execution::start_on_worker_thread(
                exec_id,
                Arc::clone(wasm_runner),
                Arc::clone(wasm_memory),
                Arc::clone(stable_memory),
                Arc::clone(sandbox_manager),
                &mut guard.workers_for_replicated_execution,
                exec_input,
                total_timer,
            ),
            ExecutionMode::NonReplicated => Execution::start_on_worker_thread(
                exec_id,
                Arc::clone(wasm_runner),
                Arc::clone(wasm_memory),
                Arc::clone(stable_memory),
                Arc::clone(sandbox_manager),
                &mut guard.workers_for_non_replicated_execution,
                exec_input,
                total_timer,
            ),
        };
    }
pub fn start_execution ( sandbox_manager : & Arc < SandboxManager > , exec_id : ExecId , wasm_id : WasmId , wasm_memory_id : MemoryId , stable_memory_id : MemoryId , exec_input : SandboxExecInput , ) { let total_timer = std :: time :: Instant :: now ( ) ; let mut guard = sandbox_manager . repr . lock ( ) . unwrap ( ) ; let wasm_runner = guard . canister_wasms . get ( & wasm_id ) . unwrap_or_else ( | | { unreachable ! ( " " exec_id wasm_id ) } ) ; let wasm_memory = guard . memories . get ( & wasm_memory_id ) . unwrap_or_else ( | | { unreachable ! ( " " exec_id wasm_memory_id ) } ) ; let stable_memory = guard . memories . get ( & stable_memory_id ) . unwrap_or_else ( | | { unreachable ! ( " " exec_id stable_memory_id ) } ) ; match exec_input . execution_parameters . execution_mode { ExecutionMode :: Replicated => Execution :: start_on_worker_thread ( exec_id , Arc :: clone ( wasm_runner ) , Arc :: clone ( wasm_memory ) , Arc :: clone ( stable_memory ) , Arc :: clone ( sandbox_manager ) , & mut guard . workers_for_replicated_execution , exec_input , total_timer , ) , ExecutionMode :: NonReplicated => Execution :: start_on_worker_thread ( exec_id , Arc :: clone ( wasm_runner ) , Arc :: clone ( wasm_memory ) , Arc :: clone ( stable_memory ) , Arc :: clone ( sandbox_manager ) , & mut guard . workers_for_non_replicated_execution , exec_input , total_timer , ) , } ; }
Starts Wasm execution using specific code and state, passing
execution input.
Starts Wasm execution using specific code and state passing execution input .
sandbox_manager
&Arc<SandboxManager>
exec_id
ExecId
wasm_id
WasmId
wasm_memory_id
MemoryId
stable_memory_id
MemoryId
exec_input
SandboxExecInput
sandbox_manager
&Arc<SandboxManager>
exec_id
ExecId
wasm_id
WasmId
wasm_memory_id
MemoryId
stable_memory_id
MemoryId
exec_input
SandboxExecInput