pub fn new(run: Box<Fn(Vec<T>, &Batcher<T>) -> () + Send + Sync>) -> Arc<Self> {
    Arc::new(Batcher {
      running: AtomicBool::new(false),
      pending_batch: Mutex::new(Vec::new()),
      pending_callbacks: Mutex::new(Vec::new()),
      callbacks: Mutex::new(Vec::new()),
      run,
    })
  }
/// Create a new batcher with a run function.
Create a new batcher with a run function.
Create a new batcher with a run function .
pub fn new(run: Box<Fn(Vec<T>, &Batcher<T>) -> () + Send + Sync>) -> Arc<Self> {
    Arc::new(Batcher {
      running: AtomicBool::new(false),
      pending_batch: Mutex::new(Vec::new()),
      pending_callbacks: Mutex::new(Vec::new()),
      callbacks: Mutex::new(Vec::new()),
      run,
    })
  }
pub fn new ( run : Box < Fn ( Vec < T > , & Batcher < T > ) -> ( ) + Send + Sync > ) -> Arc < Self > { Arc :: new ( Batcher { running : AtomicBool :: new ( false ) , pending_batch : Mutex :: new ( Vec :: new ( ) ) , pending_callbacks : Mutex :: new ( Vec :: new ( ) ) , callbacks : Mutex :: new ( Vec :: new ( ) ) , run , } ) }
Create a new batcher with a run function.
Create a new batcher with a run function .
run
Box<Fn(Vec<T>, &Batcher<T>) -> () + Send + Sync>