pub fn create_sandbox_thread(
    controller_service: Arc<ControllerServiceImpl>,
) -> Arc<dyn SandboxService> {
    let (sock_controller, sock_sandbox) = std::os::unix::net::UnixStream::pair().unwrap();

    // Run the sandbox code in a thread.
    std::thread::spawn(move || {
        run_canister_sandbox(sock_sandbox);
    });

    // Wrap with IPC layer.
    attach_ipc_service_to_socket(sock_controller, controller_service)
}
/// Runs the sandboxing code in a new thread. The given
/// "ControllerService" object will be made acessible as "upcall" IPC
/// endpoint to the sandbox thread. The returned "SandboxService" is
/// the "downcall" IPC endpoint from replica to sandbox.
Runs the sandboxing code in a new thread. The given
"ControllerService" object will be made acessible as "upcall" IPC
endpoint to the sandbox thread. The returned "SandboxService" is
the "downcall" IPC endpoint from replica to sandbox.
Runs the sandboxing code in a new thread . The given " ControllerService " object will be made acessible as " upcall " IPC endpoint to the sandbox thread . The returned " SandboxService " is the " downcall " IPC endpoint from replica to sandbox .
pub fn create_sandbox_thread(
    controller_service: Arc<ControllerServiceImpl>,
) -> Arc<dyn SandboxService> {
    let (sock_controller, sock_sandbox) = std::os::unix::net::UnixStream::pair().unwrap();
    // Run the sandbox code in a thread.
    std::thread::spawn(move || {
        run_canister_sandbox(sock_sandbox);
    });
    // Wrap with IPC layer.
    attach_ipc_service_to_socket(sock_controller, controller_service)
}
pub fn create_sandbox_thread ( controller_service : Arc < ControllerServiceImpl > , ) -> Arc < dyn SandboxService > { let ( sock_controller , sock_sandbox ) = std :: os :: unix :: net :: UnixStream :: pair ( ) . unwrap ( ) ; // Run the sandbox code in a thread. std :: thread :: spawn ( move | | { run_canister_sandbox ( sock_sandbox ) ; } ) ; // Wrap with IPC layer. attach_ipc_service_to_socket ( sock_controller , controller_service ) }
Runs the sandboxing code in a new thread.
Runs the sandboxing code in a new thread .
controller_service
Arc<ControllerServiceImpl>
controller_service
Arc<ControllerServiceImpl>