|
@@ -23,8 +23,8 @@ defmodule GenReset.Tracker do
|
|
|
GenServer.call(__MODULE__, :pids)
|
|
GenServer.call(__MODULE__, :pids)
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
- def reset do
|
|
|
|
|
- GenServer.call(__MODULE__, :reset)
|
|
|
|
|
|
|
+ def internal_reset do
|
|
|
|
|
+ GenServer.call(__MODULE__, :internal_reset)
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
def handle_call({:add, pid}, _from, state) do
|
|
def handle_call({:add, pid}, _from, state) do
|
|
@@ -39,7 +39,7 @@ defmodule GenReset.Tracker do
|
|
|
|
|
|
|
|
def handle_call(:pids, _from, state), do: {:reply, state, state}
|
|
def handle_call(:pids, _from, state), do: {:reply, state, state}
|
|
|
|
|
|
|
|
- def handle_call(:reset, _from, _state), do: {:reply, :ok, []}
|
|
|
|
|
|
|
+ def handle_call(:internal_reset, _from, _state), do: {:reply, :ok, []}
|
|
|
|
|
|
|
|
def handle_info({:DOWN, _ref, :process, object, _reason}, state) do
|
|
def handle_info({:DOWN, _ref, :process, object, _reason}, state) do
|
|
|
{:noreply, state -- [object]}
|
|
{:noreply, state -- [object]}
|