addApplicator

abstract fun addApplicator(applyTimeout: Duration, apply: suspend (value: T) -> MimiApplicatorResult): MimiParameterApplicator

Adds an out-of-date MimiParameterApplicator to the MimiProcessingParameter.

Creates and registers a MimiParameterApplicator instance to receive update requests from this MimiProcessingParameter.

No Parameter updates or Applicator synchronization attempts are triggered by calling this function.

Use MimiParameterApplicator.remove to permanently stop receiving updates.

Return

A strongly held reference to the new MimiParameterApplicator.

Since

10.0.0

Parameters

applyTimeout

The timeout that the MimiProcessingParameter should allow for updates to this MimiParameterApplicator. Updates causing the timeout to expire will be considered a failed update.

apply

A suspending function which applies the value to MimiParameterApplicator. It should return MimiApplicatorResult.Success for a successful update, or MimiApplicatorResult.Failure if the MimiParameterApplicator could not be updated. Any exceptions thrown by the block are handled as a failure.