I was reading Robert Martin's Clean Code and in that he mentions about the code being highly cohesive:
Classes should have a small number of instance variables. Each of the methods of a class should manipulate one or more of those variables. In general the more variable a method manipulates the more cohesive that method is to its class. A class in which each variable is used by each method is maximally cohesivemethod is maximally cohesive
But when we are trying to write concurrent code, we strive to limit the scope of variables to a single method to avoid race conditions. But this results in code which is least cohesive.
When designing an application/class, what should you prefer - Cohesion or Concurrency?