Home > Software engineering >  On the MFC multithreading control multiple software implementation execution order
On the MFC multithreading control multiple software implementation execution order

Time:09-22

Just shortly into the programming, don't know, the some effective methods here to see if there are any better way, my task is to use MFC control three people to write good software testing in A certain order, the three software using random sequence, every time I write software need open the same software, 16, and then after the start in my screen monitoring software of the test data (monitoring) to open 16 threads, to use such as: A: test the software disk speed, B: test software disk or C: software test whether disk data loss, rule: when A speed test to two other software to wait for A full test to start the (16), the other two B, C does not need to wait for, as long as 16 Chinese executed after the A B C, or C after B, I currently use is in the main thread loop open 16, and then put the thread handle in A queue in the deque, then one end in the thread, with SengMessage which sends the corresponding 16 Chinese after open next to the main thread window, when I need to end the test is through the use of the queue of threads in the handle to close the thread ends at the software of the open, but I feel this method is not very flexible, want to look at, according to the experience of how to design, thank you! Below is a software data display:

CodePudding user response:

Background thread + state machine model

CodePudding user response:


reference 1st floor zgl7903 response:
background thread + state machine model


Can you point in detail?

CodePudding user response:

Multithreaded + thread passage

CodePudding user response:

"Windows core programming"

CodePudding user response:

Seems a little bit complicated

CodePudding user response:

Seems a little bit complicated
Two threads not
A thread UI
Another one polling you open software
The second thread doesn't involve multithreading, logic or write ah
Even a thread, UI may free point, no?

CodePudding user response:

refer to 6th floor simoreg response:
seems a little bit complicated
Two threads not
A thread UI
Another one polling you open software
The second thread doesn't involve multithreading, logic or write ah
Even a thread, UI may free point, no?


Sometimes major can be started with a single click, sometimes is a key to all began

CodePudding user response:

A thread UI,

Another 16 threads respectively analyze A single thread control. A, B, C, respectively determine the running state of the software, that can be executed sequentially,
  • Related