Permalink
Browse files

added pool name to monitors table name

  • Loading branch information...
davidsulc committed Sep 7, 2018
1 parent f67c087 commit f15811ebe88b9d5a8ca48e33c946f94b47799ea7
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/pool_toy/pool_man.ex
View
@@ -64,10 +64,10 @@ defmodule PoolToy.PoolMan do
{:stop, {:missing_args, {:worker_spec, "child spec `worker_spec` is required"}}}
end
defp init([], %State{name: _, size: _} = state) do
defp init([], %State{name: name, size: _} = state) do
Process.flag(:trap_exit, true)
send(self(), :start_worker_sup)
monitors = :ets.new(:monitors, [:protected, :named_table])
monitors = :ets.new(:"monitors_#{name}", [:protected, :named_table])
{:ok, %{state | monitors: monitors}}
end

0 comments on commit f15811e

Please sign in to comment.