Guido van Rossum
๐ค SpeakerAppearances Over Time
Podcast Appearances
we thought and maybe we were wrong but at the time we thought well we quickly want to be able to support these multiple threads because they seemed at the time in the early 90s when they were new at least to me they seemed a cool interesting programming paradigm and one of the things that that python at least at the time felt was nice about the language was that we could give a
version of all kinds of cool new operating system toys to the Python programmer.
Like I remember one or two years before threading, I had spent some time adding networking sockets to Python.
And they were very literal translation of the networking sockets that were in the BSD operating system.
So Unix, BSD, etc.
But the nice thing was if you were using sockets from Python, then all the things you can do wrong with sockets in C would automatically give you a clear error message instead of just ending up with a malfunctioning hanging program.
And so we thought, well, we'll do the same thing with threading.
But we didn't really want to rewrite the interpreter to be thread-safe, because that would be a very complex refactoring of all the interpreter code and all the runtime code, because all the objects were written with the assumption that there's only one thread.
And so we said, okay, well, we'll take our losses.
We'll provide something that looks like threads.
And as long as you only have a single CPU on your computer, which most computers at the time did, it feels just like threads because...
The whole idea of multiple threads in the OS was that even if your computer only had one CPU, you could still fire up as many threads as you wanted.
Well, within reason, maybe 10 or 12, not 5,000.
And so we thought we had conquered the...
the abstraction of threads pretty well, because multi-core CPUs were not in most Python programmers' hands anyway.
And then, of course, a couple of more iterations of Moore's law, and computers getting faster, and at some point...
the chip designers decided that they couldn't make the CPUs faster, but they could still make them smaller.
And so they could put multiple CPUs on one chip.
And suddenly there was all this pressure about do things in parallel.
And that's where the solution we had in Python didn't work.