我一直在学习如何使用ets,但有一件事困扰着我,偶尔*,ets:match
会抛出bad argument
...而且,从他们开始,所有后续调用(即使之前调用过的调用)也会抛出bad argument
:Erlang/ets:在得到一个“坏论点”后重置ets表?
> ets:match(Tid, { [$r | '$1'] }, 1). % this match works... % Then, at some point, this comes up: ** exception error: bad argument in function ets:match/3 called as ets:match(24589,{[114|'$1']},1) % And from then on, matches stop working: > ets:match(Tid, { [$r | '$1'] }, 1). ** exception error: bad argument in function ets:match/3 called as ets:match(24589,{[114|'$1']},1)
有什么办法来“重置” ets
系统,这样我可以再次查询它(即从shell)?
*:我还没有能够重现这个问题......但是当我试图做“其他事情”时,它经常发生。