Struct dataflow::activator::RcActivator[][src]

pub struct RcActivator {
    inner: Rc<RefCell<ActivatorInner>>,
}
Expand description

An shared handle to multiple activators with support for triggering and acknowledging activations.

Activations are only triggered once the activate function has been called at least threshold times, and then not again until ack is called. This way, the RcActivator ensures two properties:

  • It does not enqueue more than one activation per activator, if there is only one activator registered with this RcActivator. Once multiple activators are registered, any ack will enable more activations.
  • The threshold to activation avoids activations purely caused by previous activations. Each scheduling of a logging dataflow potentially creates additional log data, which needs to be processed. The threshold should ensure that multiple activations under no load cause the dataflow to be scheduled. For Materialize’s log dataflows, this number seems to be larger than 32, below we might risk that we do not cause monotonically decreasing work. A value of 64 or larger is recommended, as there is no harm in bigger values. The log dataflow will still pick up all its inputs once every introspection interval, and this activator only creates additional activations.

Fields

inner: Rc<RefCell<ActivatorInner>>

Implementations

Construct a new RcActivator with the given name and threshold.

The threshold determines now many activations to ignore until scheduling the activation.

Register an additional Activator with this RcActivator.

Activate all contained activators.

The implementation is free to ignore activations and only release them once a sufficient volume has been accumulated.

Acknowledge the activation, which enables new activations to be scheduled.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Upcasts this ProgressEventTimestamp to Any. Read more

Returns the name of the concrete type of this object. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more