pub fn run_and_stop<S, F, T>(
subject: &S,
options: S::Options<'_>,
lock: UnlockedFile,
action: F,
) -> Result<T, CoordinateError<S::Error>>Expand description
Perform action in subject.
Using the given lock for synchronisation, this creates the subject if it
does not exist, starts it if itβs not running, performs the action, then
(maybe) stops the subject again, and finally returns the result of action.
If there are other users of the subject β i.e. if an exclusive lock cannot
be acquired during the shutdown phase β then the subject is left running.