Remix.run Logo
PaulHoule 2 hours ago

It was a wristwatch back then, right?

Win 95 had real processes and threads, memory protection and all of that but it wasn't terribly effective. The whole machine would go down frequently (as did Win NT despite Microsoft’s insistence otherwise; Microsoft kept repeating "It's the hardware stupid", Win2K was a great improvement but WDDM in Vista meant you could crash your display system and not crash the rest of the machine and I think got us in "rock solid" territory except for the the power management crashes that still dog us today) and it was absolutely endemic that applications would crash, I think because of memory safety problems. The industry went through a transition of "those crashes are annoying" to "those crashes prove your system is vulnerable to hacking..

I have had to argue with people so many times over that "you can't have race conditions in systems that have cooperative multithreading" in teams that couldn't fix those race conditions because they didn't believe they can exist.

Like yeah, thread A can't stomp on data that thread B depends on but you can definitely have situations where different things happen because of different orders of events. Like I was working on a knowledge graph editor in GWT around 2005 or so that had problems because it would try to cache results of XHRs and very different things could happen if a function called a callback synchronously with data from the cache or if later that callback got called by a callback that was called by the XHR. If you are systematic about things you can do it right, everybody is aware of these problems in threaded systems and threaded systems give you tools for protecting your data but in cooperative systems people will tell you don't exist even when the systems are crashing and corrupting data right before their eyes.

(Look at how Python has synchronization primitives for async that are roughly parallel to the ones in threading. In old school cooperative multithreading you are taking code that could be threaded and cutting it up into pieces manually and that gets super-difficult as complexity. Even if you don’t want to face up with concurrency means concurrency doesn’t want to face up to you.)