-spec with_ready(classy:run_level(),
fun(() -> A)) -> A | {error, not_ready}.
Helper function that run the callback if the current ready run level is at least MinLevel.
NOTE: currently it doesn’t protect against race conditions when the level is changing during execution of the callback.