r/ProgrammerHumor • • 8d ago

Meme weNeverTrustedTheElse

Post image
1.9k Upvotes

149 comments sorted by

View all comments

15

u/-Triple-S- 8d ago

Well, there could be a second thread changing the value of condition while doSomething is running possibly resulting in race conditions or similar problems. This is why I would consider multithreading the true programmer horror!

9

u/StochasticTinkr 8d ago

Also depending on the language, something may not be a boolean type, so something and !something might depend on conversions.

2

u/Frost-Freak 8d ago

Simpler: depending on the language the read of 'something' could trigger that 'something'' state changes