Uncategorized

Haskell vs. Python threading model


The Python multiprocessing module has nothing to do with threads. It tries to provide an API similar to threading (which does expose threads) with processes underneath.

Python threads are mapped to OS threads, and if you create more threads than cores the exact same thing happens as if you’d do it in C (pthreads, Win API threads, etc.) – the OS juggles the threads between cores.

There’s a lot of information online about Python threads, just Google it.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *