From cdeddbb582e7dc69d3366027bc1fd75617c2bb9c Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Sun, 31 Aug 2014 14:42:12 +0900 Subject: [PATCH] Heh, demonstrate a concurrency bug that I knew was there, yay, fixit time! --- prototype/tango-prototype/test/tango_test.erl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prototype/tango-prototype/test/tango_test.erl b/prototype/tango-prototype/test/tango_test.erl index 8a2f6a9..fa3619f 100644 --- a/prototype/tango-prototype/test/tango_test.erl +++ b/prototype/tango-prototype/test/tango_test.erl @@ -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.