diff options
| -rw-r--r-- | src/background_gc.erl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/background_gc.erl b/src/background_gc.erl index d781a29082..0275700f67 100644 --- a/src/background_gc.erl +++ b/src/background_gc.erl @@ -23,9 +23,6 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). --define(HIBERNATE_AFTER_MIN, 1000). --define(DESIRED_HIBERNATE, 10000). - -define(MAX_RATIO, 0.01). -define(IDEAL_INTERVAL, 60000). @@ -52,15 +49,14 @@ run() -> %%---------------------------------------------------------------------------- init([]) -> - {ok, run_gc(#state{last_interval = ?IDEAL_INTERVAL}), hibernate, - {backoff, ?HIBERNATE_AFTER_MIN, ?HIBERNATE_AFTER_MIN, ?DESIRED_HIBERNATE}}. + {ok, run_gc(#state{last_interval = ?IDEAL_INTERVAL})}. handle_call(Msg, _From, State) -> {stop, {unexpected_call, Msg}, {unexpected_call, Msg}, State}. handle_cast(run, State) -> do_gc(), - {noreply, State, hibernate}; + {noreply, State}; handle_cast(Msg, State) -> {stop, {unexpected_cast, Msg}, State}. @@ -88,4 +84,5 @@ run_gc(State = #state{last_interval = LastInterval}) -> do_gc() -> [garbage_collect(P) || P <- processes(), {status, waiting} == process_info(P, status)], + garbage_collect(self()), %% Since we will never be waiting... ok. |
