You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of ets funs (for example: ets:i/1, ets:delete/1) are throwing bad argument exception when atom() name is used instead of tid() even if their spec are using tab() which is atom() | tid().
---- sample log here ---
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.2 (abort with ^G)
1> ets:new(tab,[public]).
#Ref<0.3892917531.4052353025.47844>
2> ets:delete(tab).
** exception error: bad argument
in function ets:delete/1
called as ets:delete(tab)
3>
The text was updated successfully, but these errors were encountered:
You forgot to pass the {{named_table}} option to {{ets:new/2}}, so you can't refer to it by name in ETS functions. The documentation ought to be a bit clearer on this point. :/
The following works fine:
{code:java}
tab = ets:new(tab,[public, named_table]), %% note that it returns the tid()!
ets:delete(tab).
{code}
http://erlang.org/doc/man/ets.html#new-2
Original reporter:
profetasajt
Affected version:
OTP-20.2
Component:
stdlib
Migrated from: https://bugs.erlang.org/browse/ERL-657
The text was updated successfully, but these errors were encountered: