Heh, demonstrate a concurrency bug that I knew was there, yay, fixit time!

This commit is contained in:
Scott Lystig Fritchie 2014-08-31 14:42:12 +09:00
parent 18b38c249e
commit cdeddbb582

View file

@ -184,6 +184,11 @@ tango_dt_register_int(PageSize, Seq, Proj) ->
{ok, Reg2b} = tango_dt_register:start_link(PageSize, Seq, Proj,
tango_dt_register, Reg2Num),
{ok, LastVal} = tango_dt_register:get(Reg2b),
%% If we update the "old" instance of a register, then the "new"
%% instance should also see the update.
NewVal = {"Heh", "a new value"},
ok = tango_dt_register:set(Reg2, NewVal),
{ok, NewVal} = tango_dt_register:get(Reg2b),
ok.