[erlang-questions] now() on SMP

Tony Rogvall tony@REDACTED
Wed Jun 27 13:24:37 CEST 2007


I have verified the bug!

The following code crash (sometimes) with badarg on my Mac Dou Core  
2: (+S 10 -smp )

(catch ets:delete(t)), ets:new(t, [public,named_table]), lists:foreach 
(fun(I) -> spawn(fun() -> lists:foreach(fun(_) -> N=now(),  
true=ets:insert_new(t, {N}) end, lists:seq(1,100000)) end) end,   
lists:seq(1, 5)).

=ERROR REPORT==== 27-Jun-2007::13:14:33 ===
Error in process <0.2192.0> with exit value: {badarg,[{ets,insert_new, 
[t,{{1182,942873,172756}}]},{erl_eval,do_apply,5},{erl_eval,expr,5}, 
{lists,foreach,2}]}


/Tony



On 27 jun 2007, at 06.35, Luke Gorrie wrote:

> Howdy!
>
> I heard a rumour from a colleague that erlang:now() sometimes returns
> the same value twice on the SMP emulator. If that's the case then I
> suppose someone should change it back quicksmart :-)
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list