Simple thread pool in python