Skip to content

Commit 9a9be5f

Browse files
committed
add specs
1 parent 238c211 commit 9a9be5f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/live_debugger/gen_servers/ets_table_server.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ defmodule LiveDebugger.GenServers.EtsTableServer do
3131
Returns ETS table reference.
3232
It creates table if none is associated with given pid
3333
"""
34+
@spec table(pid :: pid()) :: :ets.table()
3435
def table(pid) when is_pid(pid), do: impl().table(pid)
3536

3637
@doc """
3738
Adds watcher to indicate when to delete table from ETS.
3839
It uses pid of process which the function was called.
3940
"""
41+
@spec watch(pid :: pid()) :: :ok | {:error, term()}
4042
def watch(pid) when is_pid(pid) do
4143
impl().watch(pid)
4244
end
@@ -143,6 +145,7 @@ defmodule LiveDebugger.GenServers.EtsTableServer do
143145
with {%TableInfo{alive?: false} = table_info, updated_state} <- Map.pop(state, pid),
144146
true <- Enum.empty?(table_info.watchers) do
145147
:ets.delete(table_info.table)
148+
IO.inspect(pid, label: "DELETING TABLE")
146149
updated_state
147150
else
148151
_ ->

0 commit comments

Comments
 (0)