Created by: walloollaw
fix hang bug in parallel_map.py when using multiprocessing caused by some consumers exit abnormally.