DEV Community

Discussion on: WHY YOU SHOULD BE FOLLOWING THE SINGLE RESPONSIBILITY PRINCIPLE

Collapse
 
rhuzaifa profile image
Huzaifa Rasheed • Edited

I appreciate your suggestion. I have a question and correct me if I am wrong, Does the Race Condition or Data Race also occur in single thread programs/code?

Collapse
 
darkain profile image
Vincent Milum Jr

If there is truly only one invocation possible at a time, then yes, that is fine. But that simply isn't scalable. If we're looking at a web application or API for instance, multiple users would be using the site at the same time.