i_love_python icon indicating copy to clipboard operation
i_love_python copied to clipboard

multithreaddownloadXkcd.py isn't actually a multithread implementation

Open khalibartan opened this issue 8 years ago • 0 comments

I was just going through the script and I found that you were using higher interface of threading provided by thread module but python has GIL(Global interpreter locker) which actually doesn't run threads in parallel but in sequence by putting them in a process queue, this slows down the process. Instead of using thread module you can use threadpool from multiprocessing module.

This isn't a issue, but couldn't find a medium to update.

khalibartan avatar Mar 30 '16 16:03 khalibartan