anchor.diff:  -spec(resume(Id) ->
                ok | {error, any()} when Id::atom()).
   resume(Id) ->
  -    resume(Id, 8).
  +    exec_sub_fun(Id, fun resume/2).
   resume(_Id, 0) ->
       ok;
   resume(Id, Seq) ->
  
positive.code: -spec(decr_interval(Id) ->
               ok | {error, any()} when Id::atom()).
  decr_interval(Id) ->
      decr_interval(Id, 8).
  decr_interval(_Id, 0) ->
      ok;
  decr_interval(Id, Seq) ->
  
negative.code:                     exit(noproc)
              end
      end.
  
  
  %% @private
  exec_sub_fun(Id, Fun) ->
      case application:get_env(leo_mq, Id) of
          {ok, #mq_properties{db_procs = NumOfDbProcs}} ->
              Fun(Id, NumOfDbProcs);
          _ ->
              {error, not_initialized}
      end.
  