what’s interesting is that as a newbie developer I always thought multi-threading is just like the…
moh tabi

Multi-threading is just a bunch of threads sharing the CPU.

You can think of the CPU as a semaphore with a value equal to the number of cores that it has: 
all the threads keep asking for the CPU but after the execution of one command they must give back the resource and ask for it again over and over (it’s not really like this but as a “high level idea” it works, for the real thing please see here 😊).

Show your support

Clapping shows how much you appreciated Federico Zanetello’s story.