using thread variables to declare readonly action