Let\'s say I have a runnable with a simple integer count variable which is incremented every time runnable runs. One instance of this object is submitted to run periodically in
No, this code is not thread-safe since there isn't any happens before relation between different threads accessing count.
count