pub struct PlanRunner { /* private fields */ }Expand description
Runs multiple OutputPlans in parallel, managing the number of threads
used to run them.
Implementations§
Source§impl PlanRunner
impl PlanRunner
Sourcepub fn new(plans: Vec<OutputPlan>, num_threads: usize) -> Self
pub fn new(plans: Vec<OutputPlan>, num_threads: usize) -> Self
Create a new PlanRunner with the given plans and number of threads.
Progress reporting is disabled by default.
Sourcepub fn with_progress_tracker(self, tracker: Arc<dyn ProgressTracker>) -> Self
pub fn with_progress_tracker(self, tracker: Arc<dyn ProgressTracker>) -> Self
Attach a ProgressTracker.
The runner pre-registers each table’s output-unit total with the
tracker before scheduling, calls ProgressTracker::increment
after output units are written, and calls ProgressTracker::finish
once on the success path. Implementations needing cleanup on the
error or panic path should use Drop as a fallback.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PlanRunner
impl !UnwindSafe for PlanRunner
impl Freeze for PlanRunner
impl Send for PlanRunner
impl Sync for PlanRunner
impl Unpin for PlanRunner
impl UnsafeUnpin for PlanRunner
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