I have two Objects that implement the Runnable interface.
Lets say i have Thread_1 and Thread_2 objects.
Thread_1 has global variable myVariable; and method myMethod() which uses the myVariable variable.
Thread_2 has variable of type Thread_1
So here is the scenario:
Both threads: Thread_1 and Thread_2 are running.
if Thread_1 is currently using myMethod() (which uses myVariable) and at the same time Thread_2 is using Thread_1's myVariable throught Thread_1 (without calling the myMethod() method ) should i synchronize the myVaribale variable or not?