4.3.10 at_lower_level(RunLevel, Fun)

-spec at_lower_level(classy:run_level(),
                     fun(() -> Ret)) -> Ret.

This helper function can be used to lower the run level of the system to the given value and run the specified function. It can be used to implement migrations that require business applications to be stopped. It sets up a temporary barrier and removes it once Fun is complete.

WARNING: it guarantees that the run level will be at most RunLevel, but it can be lower.

JavaScript license information