windows - Using iocp in a job pool -


To minimize the overhead of signaling while using IOCP in task / task pool to provide worker awareness What is the best way to do the port - that is it is not doing every queue operation?

zero worker () (while (1) {for (int spin = 0; spin & lt; 5000; ++ spin) (q.kount> 0) qipopfront () ();

  Waiting Complimentport ();}  

}

...

Q. Pushback Work); // When to complete the port signal, but avoid every queue operation?

For example, there is a problem between being lined up in some type of code sketch And if you try and point to the port of every queue operation If you want to avoid giving it, then waiting is done.

You use IoC as your queue Why do not you and post your work item directly? In this way you can get a thread secure queue for free and you can completely remove the other queue?

This question then Will run;)


Comments