What is the difference between threading, asyncio and multiprocessing libraries? I heard about all of them in the context of optimization, but I wonder if they are not doing the same thing?
Multiprocessing typically used when you need parallelization for different CPU cores. And threading and asyncio is for other forms of concurrency, asyncio is preferred when you have many I/O tasks. You need to understand the difference between concurrency and parallelism to figure this out. Look for more answers on this topic here https://imaginghub.com/forum/posts/1406-how-is-concurrency-different-to-parallelism and here https://imaginghub.com/forum/posts/1401-python-s-asyncio-and-threading