Concurrency Ain’t Concurrent
2024-12-09
In 1950, "concurrency" made sense as a way to time-share expensive CPU time.
In 2024, though, what is the point of "concurrency"?
Why not just use many $5.00 Arduinos each running single-threaded code?
Concurrency ain't concurrent anyway in most modern popular programming languages (Rust, Lisp, async/await, etc.).
con·cur·ren·cy
/kənˈkərənsē/
noun
noun: concurrency; plural noun: concurrencies
the fact of two or more events or circumstances happening or existing at the same time."the unfortunate concurrency of both high debt and high unemployment"
COMPUTING
the ability to execute more than one program or task simultaneously."a high level of concurrency is crucial to good performance in a multiuser database system"
When using modern programming languages, like Rust, Python, etc. nothing happens at the same time. There is only one CPU. In multi-core chips, there are many CPUs, but they all access the same shared memory and, hence, they must synchronize and can’t actually run “at the same time”.
Context-switching happens so quickly as to fool the human eye. The tasks run sequentially, but get swapped in and out so quickly that humans perceive the tasks to be running at the same time, even though that is not what happens.
Modern notions of "concurrency" don't even model the many-distributed-Arduinos situation correctly. You don't bother to share memory when all you've got is 1 wire between Arduinos.
“Thread safety" isn't actually an issue for most reality-based applications.
Deprecating "thread safety" significantly increases simplicity of programming environments.
See Also
References: https://guitarvydas.github.io/2024/01/06/References.html
Blog: https://www.guitarvydas.github.io
Videos: https://www.youtube.com/@programmingsimplicity2980
Discord: https://discord.gg/65YZUh6Jpq
Leanpub: [WIP] https://leanpub.com/u/paul-tarvydas
Gumroad: https://tarvydas.gumroad.com
Twitter: @paul_tarvydas





