Prevent multiple instances of threads for multipro

2019-09-15 04:10发布

问题:

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?