Skip to main content

EvaluateOperation

Trait EvaluateOperation 

Source
pub trait EvaluateOperation: Send + Sync {
    // Required methods
    fn operation<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Operation>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stats(&self) -> PoolStatsSnapshot;
    fn pre_warm(&self);
}

Required Methods§

Source

fn operation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Operation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stats(&self) -> PoolStatsSnapshot

Source

fn pre_warm(&self)

Eagerly spawn a Node.js worker so it’s ready when the first Self::operation is called. The worker should go into the idle queue.

If a worker request comes in while this is still initializing, it should wait on the bootup semaphore and will resume when the worker is ready.

Implementors§