Struct wasm_mt_pool::ThreadPool
source · pub struct ThreadPool(_);
Implementations§
source§impl ThreadPool
impl ThreadPool
pub fn new(size: usize, pkg_js_uri: &str) -> Self
pub fn new_with_arraybuffers(
size: usize,
ab_js: ArrayBuffer,
ab_wasm: ArrayBuffer
) -> Self
pub fn set_ab_init(&self, ab: ArrayBuffer)
pub async fn init(&self) -> Result<&Self, JsValue>
pub async fn and_init(self) -> Result<Self, JsValue>
pub fn count_pending_jobs(&self) -> usize
pub fn exec<F>(&self, job: F)where
F: MtClosure,
pub fn exec_async<F, T>(&self, job: F)where
F: MtAsyncClosure<T>,
pub fn exec_with_cb<F, G>(&self, job: F, cb: G)where
F: MtClosure,
G: PoolCallback,
pub fn exec_async_with_cb<F, T, G>(&self, job: F, cb: G)where
F: MtAsyncClosure<T>,
G: PoolCallback,
pub fn exec_js(&self, js: &str)
pub fn exec_js_async(&self, js: &str)
pub fn exec_js_with_cb<G>(&self, js: &str, cb: G)where
G: PoolCallback,
pub fn exec_js_async_with_cb<G>(&self, js: &str, cb: G)where
G: PoolCallback,
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ThreadPool
impl !Send for ThreadPool
impl !Sync for ThreadPool
impl Unpin for ThreadPool
impl !UnwindSafe for ThreadPool
Blanket Implementations§
source§impl<T> Type for Twhere
T: ?Sized,
impl<T> Type for Twhere
T: ?Sized,
source§default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
Create a dangling non-null
*const Self
with the provided Self::Meta
.source§default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
Create a
*mut Self
with the provided Self::Meta
.source§fn meta_type(self: *const Self) -> MetaType
fn meta_type(self: *const Self) -> MetaType
Helper method describing whether a type is
TraitObject
, Slice
or Concrete
.source§impl<T> Type for T
impl<T> Type for T
source§const METATYPE: MetaType = MetaType::Concrete
const METATYPE: MetaType = MetaType::Concrete
Enum describing whether a type is
TraitObject
, Slice
or Concrete
.source§fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
Create a dangling non-null
*const Self
with the provided Self::Meta
.source§fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
Create a
*mut Self
with the provided Self::Meta
.source§fn meta_type(self: *const Self) -> MetaType
fn meta_type(self: *const Self) -> MetaType
Helper method describing whether a type is
TraitObject
, Slice
or Concrete
.