pub struct Worker<T> { /* private fields */ }
Implementations§
Source§impl<T> Worker<T>
impl<T> Worker<T>
Sourcepub fn auto_batched(batch_size: usize) -> Worker<T>
pub fn auto_batched(batch_size: usize) -> Worker<T>
Creates an auto-batched Worker queue with fixed-length buffers. At capacity, the buffer is swapped out and ownership taken by the returned Stealer. Batch size must be a power of 2
§Examples
use swap_queue::Worker;
let w = Worker::<i32>::auto_batched(64);
Trait Implementations§
impl<T: Send> Send for Worker<T>
Auto Trait Implementations§
impl<T> !Freeze for Worker<T>
impl<T> !RefUnwindSafe for Worker<T>
impl<T> !Sync for Worker<T>
impl<T> Unpin for Worker<T>
impl<T> !UnwindSafe for Worker<T>
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