Arc Forumnew | comments | leaders | submitlogin
1 point by garply 5220 days ago | link | parent

akkartik's code died on me with the first time I ran it, but I haven't been able to reproduce it.

This is what happens with palsecam's code:

arc> (= var 0 tbl (obj var 0))

#hash((var . 0))

arc> (repeat 50000 (thread (++ var) (++ tbl!var)))


arc> var


arc> tbl!var


1 point by palsecam 5220 days ago | link

  arc> var
is strange, but the code you tried is not the one demonstarted a bug. You should 'sleep in the threads (i.e: the second example in my comment).


1 point by garply 5219 days ago | link

When I do the second example, I get results similar to yours.