pub struct OffloadPool { /* private fields */ }Expand description
A bounded shared worker pool. Cheap to clone. See the module docs.
Implementations§
Source§impl OffloadPool
impl OffloadPool
Sourcepub fn new(cfg: OffloadConfig) -> OffloadPool
pub fn new(cfg: OffloadConfig) -> OffloadPool
Creates a pool. No thread starts until the first job.
Sourcepub fn try_submit(&self, job: Job) -> Result<(), Rejected>
pub fn try_submit(&self, job: Job) -> Result<(), Rejected>
Queues a job, or refuses it at once.
Sourcepub fn stats(&self) -> OffloadStats
pub fn stats(&self) -> OffloadStats
Counters.
Trait Implementations§
Source§impl Clone for OffloadPool
impl Clone for OffloadPool
Auto Trait Implementations§
impl Forget for OffloadPool
impl Freeze for OffloadPool
impl Move for OffloadPool
impl RefUnwindSafe for OffloadPool
impl Send for OffloadPool
impl Sync for OffloadPool
impl Unpin for OffloadPool
impl UnsafeUnpin for OffloadPool
impl UnwindSafe for OffloadPool
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