You would have to think some more about how to print every time the shared variable changes value.
In reply to Re^3: Threading in a loop by CountOrlok in thread Threading in a loop by jerre_111