Famous TCL paper from 1995, regarding event based programming.
"Why Threads Are A Bad Idea (for most purposes)"
Re:Ruby 3.2.0 Is from Another Dimension
by samsquire on Thursday January 05, 2023 @02:37PM
(#34265308)
I don't think threads are a poor idea but they have sharp edges.
I work on multithreaded software and I get 31,516,776 synchronizations per second with a lock free algorithm and 31,565,052 on the lock benchmark.
When the threads are increased to 100 (contention) the lock benchmark does 3,419,271 requests per second whereas the lock free algorithm does 19,926,428 so the contention hurts them both but the lock free benchmark scales far better.
Threads aren't bad. The domain is not easy.
IIRC, a bigger reason for Node's popularity (at least at the very beginning of its popularity) was the fact that it had event-based I/O, which let a single process handle a lot more in-flight requests than Ruby (where the concurrency model was to spin up a bunch of processes and multiplex across them with nginx or similar).