[erlang-questions] ets:select_delete problem

Mike Oxford moxford@REDACTED
Sat Nov 12 02:56:27 CET 2011


It was that exact protection which was causing me to have problems.
spawn_link()'d it, locking myself out.

d'oh.

Thank you!

-mox

On Fri, Nov 11, 2011 at 5:07 PM, Magnus Klaar <magnus.klaar@REDACTED> wrote:
> Hi!
> There is nothing wrong with your match specifications, would it be possible
> to provide information
> on how and with which options the table was created? A table is protected by
> default which means
> that no process other than the one which created table can update the table.
> Queries like ets:select
> and ets:select_count are permitted.
> / Magnus
> On Sat, Nov 12, 2011 at 12:56 AM, Mike Oxford <moxford@REDACTED> wrote:
>>
>> ets:select_delete() does not work for me.
>>
>> The match spec works in ets:select() and ets:select_count().
>>
>> It IS coded to return the atom true as required.
>>
>> ets:select(json_in_stats, [{{'$1','$2'},[],['$$']}]).
>> [[63488274842,1]]
>>
>> ets:select(json_in_stats, [{{'$1','$2'},[],[true]}]).
>> [true]
>>
>> ets:select_count(json_in_stats, [{{'$1','$2'},[],[true]}]).
>> 1
>>
>> ets:select_delete(json_in_stats, [{{'$1','$2'},[],[true]}]).
>> ** exception error: bad argument
>>     in function  ets:select_delete/2
>>        called as
>> ets:select_delete(json_in_stats,[{{'$1','$2'},[],[true]}])
>>
>> What am I doing wrong?
>>
>> -mox
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>



More information about the erlang-questions mailing list