pub trait Compute: Send + Sync {
// Required method
fn spawn(&self, job: Job);
// Provided method
fn runs_inline(&self) -> bool { ... }
}Expand description
Where decode batches run. Implemented for any Fn(Job):
|job| rayon::spawn(job), |job| { tokio::task::spawn_blocking(job); },
or Inline to run on the calling task (single-threaded hosts, tiny
images).
Required Methods§
Provided Methods§
Sourcefn runs_inline(&self) -> bool
fn runs_inline(&self) -> bool
Whether spawn would run the job right here, on the calling task.
The drivers then call the batch directly, without boxing it or
creating a channel for its result. Default false.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".