Hi plp..
I'm having some problems with overhead in my thread, when I use the sleep with 2 seconds it does not happen, but when I use the "fast mode", 1 millisecond the problem occurs.
This thread are checking a queue, so if there're no elements, it check again, at Java i resolve it with the .wait() and notifyAll() command, but in C++ I don't know.