c++ - Using COM object in parallel_for loop, -
In my code I am using a parallel_for loop, in this loop I am calling from the COM object, But when it moves, it has not been executed correctly, something that says that COM can not be executed in any other thread,
what do I have to do, do I have to multiply or multiply What to do,
This is my code
COMObject myCom; Parallel_for (tall (1), count, [& amp;] (long i) {myCom-> few calls (i);}); I think you should set MTAThreadAttribute [MTAThread] need to . For more information see:
Comments
Post a Comment