0

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Varun
  • 31
  • 1
  • 8
  • thread is not copied, it can be created by another process, if yo'll paste your code it can be much easier to help, i'm guessing you want only the main process to open the thread and all the other sub-process just to run..... – Kobi K Oct 11 '13 at 15:10
  • As Kobi said, your threads are not being "copied" to your subprocesses. It may be that your e-mail threads are sending the e-mails multiple times, or that your subprocesses are launching the threads themselves. We can't help without you posting some code. – skrrgwasme Sep 18 '14 at 19:55

0 Answers0