When evaluating this, the final value of a is 0 as it should be, but Dynamic[a] shows a 1.
a = 0;
Dynamic[a]
Block[{a = 1}, Pause[1]; a];
(*1*)
When excluding all Pause calls, there is no bug.
a = 0;
Dynamic[a]
Block[{a = 1}, a];
(*0*)
Is it possible to force Dynamic to update without changing the value of a?
Refreshas inDynamic[Refresh[a, UpdateInterval->0]]? – kale Jul 03 '16 at 19:22PausewithDo[1, {10000000}];-- I think it's a lengthy calculation that causes the system to updateawhen it is 1. – Michael E2 Jul 03 '16 at 19:27Clear[a]solves it. Note that the second comes out0only becauseais restored to0by the time the dynamic update executes. It's possible that it won't always be0, I suppose, since there is a very small window between setting and restoringa(in the second example). – Michael E2 Jul 03 '16 at 19:34