/// Creates new sandbox manager. In order to operate, it needs
/// an established backward RPC channel to the controller process
/// to relay e.g. syscalls and completions.
Creates new sandbox manager. In order to operate, it needs
an established backward RPC channel to the controller process
to relay e.g. syscalls and completions.
Creates new sandbox manager . In order to operate it needs an established backward RPC channel to the controller process to relay e . g . syscalls and completions .
pub fn new(controller: Arc<dyn ControllerService>) -> Self {
        // TODO(EXC-755): Use the proper embedder config.
        let config = ic_config::embedders::Config::default();
        SandboxManager {
            repr: Mutex::new(SandboxManagerInt {
                canister_wasms: HashMap::new(),
                memories: HashMap::new(),
                workers_for_replicated_execution: threadpool::ThreadPool::new(1),
                workers_for_non_replicated_execution: threadpool::ThreadPool::new(
                    config.query_execution_threads,
                ),
                workers_for_cleanup: threadpool::ThreadPool::new(1),
            }),
            controller,
            config,
        }
    }
pub fn new ( controller : Arc < dyn ControllerService > ) -> Self { // TODO(EXC-755): Use the proper embedder config. let config = ic_config :: embedders :: Config :: default ( ) ; SandboxManager { repr : Mutex :: new ( SandboxManagerInt { canister_wasms : HashMap :: new ( ) , memories : HashMap :: new ( ) , workers_for_replicated_execution : threadpool :: ThreadPool :: new ( 1 ) , workers_for_non_replicated_execution : threadpool :: ThreadPool :: new ( config . query_execution_threads , ) , workers_for_cleanup : threadpool :: ThreadPool :: new ( 1 ) , } ) , controller , config , } }
Creates new sandbox manager.
Creates new sandbox manager .
controller
Arc<dyn ControllerService>