Give a stream of consciousness and then the final answer. Two physical systems are in thermal equilibrium if there are no net flow of thermal energy between them when they are connected by a path permeable to heat. Thermal equilibrium obeys the zeroth law of thermodynamics. A system is said to be in thermal equilibrium with itself if the temperature within the system is spatially and temporally uniform.

Answer this question: when are two bodies said to be in thermal equilibrium?
To answer the above question, the relevant sentence is: Two physical systems are in thermal equilibrium if there are no net flow of thermal energy between them when they are connected by a path permeable to heat.
So, the final answer is if there are no net flow of thermal energy between them when they are connected by a path permeable to heat.