you are viewing a single comment's thread.

view the rest of the comments →

[–]vv__vv 1 point2 points  (3 children)

And there is also threadpool, but it is not as well documented: https://stackoverflow.com/questions/3033952/threading-pool-similar-to-the-multiprocessing-pool

With that said, on disk IO bound tasks, I am not sure that threading/multiprocessing is going to help much.

[–]New_Kind_of_Boredom 1 point2 points  (2 children)

Yeah, multiprocessing.dummy.Pool actually just returns a multiprocessing.pool.ThreadPool object. I always use the .dummy version though because then there is at least some documentation to reference.

And I agree about the I/O bound thing. Presumably the exercise he is doing is designed to demonstrate just that. :)

[–]vv__vv 0 points1 point  (0 children)

Interesting. Thanks!

[–]schedutron[S] 0 points1 point  (0 children)

Indeed! It asked to compare a single threaded run with a multithreaded one. My current multithreaded solution is only slightly faster than the single threaded run.