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.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RcActivator
impl !Send for RcActivator
impl !Sync for RcActivator
impl Unpin for RcActivator
impl !UnwindSafe for RcActivator
Blanket Implementations
Mutably borrows from an owned value. Read more
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