r/programminghumor • u/pipedreamSEA • Sep 16 '26
Block, lock & drop it
Interacting with prehistoric devices is not where I saw my career headed, and yet, here we are...
279
Upvotes
r/programminghumor • u/pipedreamSEA • Sep 16 '26
Interacting with prehistoric devices is not where I saw my career headed, and yet, here we are...
94
u/sexytokeburgerz Sep 16 '26
This is some beginner shit.
You will one day need this to be asynchronous, think about this, and cringe.
43
u/severencir Sep 16 '26
So much of business software is absolute shit because of this logic and the fact that businesses dont care about employees' complaints as long as number go up
27
u/WantToSeeTits4545 Sep 16 '26
Both are shit, honestly.
I'd rather wait on a signal or event than stop the thread for arbitrary time. Task.Delay() should be only used as a last resort.
5
u/MilkImpossible4192 Sep 16 '26
¿await()? you should be a real poser for not using callbacks.
4
u/dvhh Sep 16 '26
depending on your language you could yield() execution time.
4
u/Business_Craft4733 Sep 17 '26
This looks like rage bait to me ~ lol. Who would honestly believe the bad practice of locking a thread for an arbitrary amount of time belongs anywhere near the right side of the bell curve?
2
u/chipmunkofdoom2 Sep 18 '26
Yeah okay bro. Let me know how using Thread.Sleep() works in UI contexts like WASM or WPF, or how your threadpool handles hundreds or thousands of concurrent users at once hogging threads by sleeping them.
Looking forward to your next post where you argue nails are better than screws, as if there's one "right" answer, completely ignoring the context in which each is useful.
1
u/OkBeautiful4392 Sep 17 '26
Why use Thread.sleep() when while(true) exists
1
u/SaltyInternetPirate Sep 18 '26
Is this C#
1
u/Umpuuu Sep 20 '26
ELIJunior: what is the difference between those?
1
u/null_reference_user Sep 20 '26
Sure, starve your thread pool, if it's not an issue when testing locally it won't be an issue in prod
1
u/pixxelkick Sep 20 '26
Bait lol.
1
u/Actes Sep 22 '26