pub struct HostWorkerPool { /* private fields */ }Expand description
A WorkerPool handed to the library.
Implementations§
Source§impl HostWorkerPool
impl HostWorkerPool
pub fn new<P: WorkerPool + 'static>(pool: P) -> Self
Sourcepub fn as_ptr(&self) -> *mut c_void
pub fn as_ptr(&self) -> *mut c_void
Raw interfaces::WorkerPool*, for library calls that take one.
pub fn thread_count_through_native(&self) -> usize
pub fn wait_idle_through_native(&self)
Sourcepub fn submit_sentinel_through_native(&self, sentinel: &mut i32)
pub fn submit_sentinel_through_native(&self, sentinel: &mut i32)
Submit a task from the C++ side that increments sentinel.
This is how the tests prove a submitted task actually reached the Rust pool and ran: the closure lives in C++, so nothing but a real round trip can move the counter.
Trait Implementations§
Source§impl Debug for HostWorkerPool
impl Debug for HostWorkerPool
Source§impl Drop for HostWorkerPool
impl Drop for HostWorkerPool
impl Send for HostWorkerPool
impl Sync for HostWorkerPool
Auto Trait Implementations§
impl !RefUnwindSafe for HostWorkerPool
impl !UnwindSafe for HostWorkerPool
impl Freeze for HostWorkerPool
impl Unpin for HostWorkerPool
impl UnsafeUnpin for HostWorkerPool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more