Trait hotdrink_wasm::thread::WorkerPool[][src]

pub trait WorkerPool: ThreadPool {
    fn from_url(
        initial: usize,
        termination_strategy: TerminationStrategy,
        wasm_bindgen_shim_url: &str
    ) -> Result<Self, Self::NewError>
    where
        Self: Sized
; }

An extension of thread pools specifically for ones that use web workers. Passing in the shim url ensures that we don’t create multiple copies of it.

Required methods

fn from_url(
    initial: usize,
    termination_strategy: TerminationStrategy,
    wasm_bindgen_shim_url: &str
) -> Result<Self, Self::NewError> where
    Self: Sized
[src]

Constructs a new pool as usual, but with a specified path to the Web Worker source. This is useful to avoid creating many instances of the blob.

Loading content...

Implementations on Foreign Types

impl WorkerPool for DummyPool[src]

Loading content...

Implementors

Loading content...