Prevent multiple instances of threads for multiprocessing python

拟墨画扇 提交于 2020-01-07 08:07:05

问题


I want to run a thread for sending email periodically. In the same program, I am creating processes to do another task. When I create the task, thread from original process is copied to these sub processes and I end up receiving multiple emails instead of one. How can I make sure that thread I run in main program is not copied to the sub processes that are created?

来源:https://stackoverflow.com/questions/19320756/prevent-multiple-instances-of-threads-for-multiprocessing-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!