Skip to main content

ProcessRunHandle

Trait ProcessRunHandle 

Source
pub trait ProcessRunHandle: Send + Sync {
    // Required method
    fn claim_and_run_pending<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

One lease-protected drive of the registry’s pending (non-terminal) processes.

Implementations claim the single-owner ProcessLease per non-terminal row to fence execution, so a concurrent drive on another owner skips an already-leased process and a process runs exactly once.

Required Methods§

Source

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

Claim and run every pending process this owner can claim, driving each to a terminal state. Idempotent: leased and terminal rows are skipped.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§