Home > Back-end >  Strange, questions about different threads setting different CPU
Strange, questions about different threads setting different CPU

Time:11-13

I created a TIMAGE subclasses, class defines TThread, in the new thread constructor, use duplicatehandle to get the handle of the thread, the measured each new generated classes, the thread handle is different, and then use setthreadaffinitymask is used to set the thread which CPU, it was found that all threads are using the latest generation of the CPU thread definition,


As a result, I was supposed to different objects can use different CPU run, but in fact, all the objects define the threads in a thread running in the latest object of the CPU, when you are at runtime, you can see there is a CPU already occupied, then generate a new object, will become the next CPU filled,

The environment is builder6.0 c + +