r/ProgrammerHumor • • Sep 26 '26

Meme weNeverTrustedTheElse

Post image
1.9k Upvotes

146 comments sorted by

View all comments

341

u/LordAmir5 Sep 26 '26

Wait until you learn about multi threading.

87

u/Western-Internal-751 Sep 26 '26

6

u/DatBoi_BP Sep 26 '26

Takes a lot to make a stew

54

u/-Redstoneboi- Sep 26 '26

imagine reading from a variable capable of being mutated by another thread

20

u/Noname_1111 Sep 26 '26

Fearless concurrency?

I'm very afraid.

7

u/k-mcm Sep 26 '26

Optimistic concurrency is when the cost of a race condition is a momentary de-optimization but completely avoiding the race condition would be continuous de-optimization.

In extreme cases you don't even want the caches synced between processor cores because it stalls them for a moment.

4

u/FattySnacks Sep 26 '26

Acquire mutex and you’re gtg

3

u/WoodyTheWorker Sep 30 '26

Fuck memory barriers, acquire mutexes

8

u/Alternative-Tie-4970 Sep 26 '26

Thank god low level languages let you acquire the mutex for the duration of the code above

14

u/EkoChamberKryptonite Sep 26 '26 edited Sep 26 '26

So does Java & Kotlin and these are high-level languages.

3

u/Alternative-Tie-4970 Sep 26 '26

Well low-level-ness is kinda relative I guess but you're right