Home > Back-end >  How to implement multithreaded detection sensor value
How to implement multithreaded detection sensor value

Time:01-07

Now there is a problem, I want to be a plug-in, the function of this plugin is in the main program execution to one step will use wm_copydata message to send a notification, then after receive the notification on my side began to execute the business logic, a sensor detection equipment, the main program is twelve thread each thread is equivalent to a channel, the 12 channels may also sends the message may not be sent at the same time, so I want to distinguish which process is sent and then determine which sensor value, need a thread pool to do excuse me such a scene, the real-time requirements or higher, best can provide a train of thought,

CodePudding user response:

12 threads do not want to use the thread pool,

CodePudding user response:

Main is don't know how to control the 12 threads, because each thread is not the same as the opening and closing time, and best can accurately control thread execution time so, mentally,
  • Related