Threads problem
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I have a problem with Threads !In a console application ,I am trying to create 10 threads using CreateThread(..). Each Thread created tries to call the interface function which will add records to database !The problem is I have given separate ThreadProcs for each thread .But, what happens is some threads log more than once.So, the loggings of some threads are lost !But, teh number of loggings are correct !How can I rectify the problem ! The Mutexes need not do anything here .But, i can get the correct result only if I use Mutex at the start of each ThreadProc .It is logically wrong !How can i rectify the problem ! Thanx in advance for the help ! Regards, yamini Y.Yamini Devi.