4 ms·
JavaScript, Lua, and Qt have all given me cases of single-threaded concurrency because you can poll the event loop from inside a function. (I don't remember wha
by 01HNNWZ0MV43FF 3y ago
JavaScript, Lua, and Qt have all given me cases of single-threaded concurrency because you can poll the event loop from inside a function. (I don't remember what loop I was using in Lua)
So you don't get memory unsafety (except in Qt) but you do get immutable variables changing when you're not looking at them.
Actually maybe it was c#. I wrote a coroutine in c# once and I regret that I did not make it an explicit state machine. Having to re-check all my shared state after each await point made it worthless.
Sure state machines look like mashed potatoes compared to "wow it's just communicating processes" threads but it represents the complexity of the program more accurately at a glance. Maybe the domain really is mashed potatoes
- whaleofatw2022 3y agoI mean, the semi fun thing in C# is you can still YOLO the async state machine to where it is clean to consumers, But agree, sometimes to solve the problem best you gotta get dirty.