top | item 42135044

(no title)

tightbookkeeper | 1 year ago

> hang

Hang implies there is something you are not responding to.

Let me ask again. What are you imagining your main thread should be doing while it is waiting for essential data?

responding to new inputs means changing state. But your program is already in another. Two separate program execution states are best described by two separate threads.

> crash

Crash early, crash often. If invariants can’t be maintained, don’t pretend otherwise.

discuss

order

will_crusher|1 year ago

"Ah, the ‘crash early, crash often’ mantra — truly inspiring. I guess when your program explodes because it can’t handle concurrency, we should just sit back, crack open a cold one, and toast to ‘maintaining invariants.’

And sure, let’s talk about state. If handling multiple states at once is ‘extremely difficult,’ then yes, async/await might not be the best for anyone who panics when their program has to juggle more than one thing. But that's kind of the point.

Async/await is like giving you a leash for your concurrency so you don’t need to wrangle state machines on a pogo stick. But hey, if you’re happier living on the edge of crashville because ‘the OS scheduler will save me,’ who am I to interrupt your Zen?”