pub struct Pool { /* private fields */ }Expand description
A pool of threads that do nothing but wait for disks.
Cloning a handle is cheap and gives another handle on the same pool. The threads stop when the last handle goes away.
Implementations§
Source§impl Pool
impl Pool
Sourcepub fn new(config: Config) -> Self
pub fn new(config: Config) -> Self
A pool sized and configured by config.
§Panics
If a thread cannot be spawned, which is not a condition a database can carry on from and is not one a caller can do anything about.
Sourcepub fn submit(&self, file: &Arc<dyn File>, requests: Vec<Request>) -> Completion
pub fn submit(&self, file: &Arc<dyn File>, requests: Vec<Request>) -> Completion
Queues every request against file and hands back something to wait on or poll.
The requests are merged where the configuration says to, then queued. This call does not block on the disk, which is the point: the caller goes back to decoding the row group it already has.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pool
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnsafeUnpin for Pool
impl UnwindSafe for Pool
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