Python multiprocessing - How to release memory when a process is done?

前端 未结 3 1175
醉酒成梦
醉酒成梦 2020-12-14 15:27

I encountered a weird problem while using python multiprocessing library.

My code is sketched below: I spawn a process for each \"symbol, date\" tuple. I combine th

3条回答
  •  太阳男子
    2020-12-14 16:08

    You should probably call close() followed by wait() on your Pool object.

    http://docs.python.org/library/multiprocessing.html#module-multiprocessing.pool

    join() Wait for the worker processes to exit. One must call close() or terminate() before using join().

提交回复
热议问题