Home > Software engineering >  The process of too much time in the program
The process of too much time in the program

Time:09-20

I have a FOR loop, the process of program AfxBeginThread will take up a lot of time, during this time, the program can only handle things here, jump out, scan, there is no way FOR other timer, excuse me, how should solve?

CodePudding user response:

Did you do the thread synchronization? That you have to have a Sleep in the for loop, or in the threads continuously running, other threads are not rob chance,

CodePudding user response:

Thread to Sleep (0)

CodePudding user response:

Well,
The main function is in the midst of a timer 0, threads in this thread, there is a FOR function
FOR function at execution time, other timer 1 can't response,

CodePudding user response:

State machine, find out.

CodePudding user response:

With thread, also use what timer? To use should also use the "no window timer SetWaitableTimer"
  • Related