DEV Community

Discussion on: Multithread queue

Collapse
 
rhymes profile image
rhymes • Edited

Cool Andrés! A very simple and understandable implementation of a thread pool.

You might be interest in the ThreadPoolExecutor.

It's similar to your MultithreadQueue but you can also get results from the submitted functions and shutdown the pool. Check it out, it's been part of Python since version 3.2