I have a worker thread which is alive from the start of the programme and would consistently take an object from a queue to process. I am wondering what is the best way to block the thread? The object would be pushed into the queue at about magnitude of every tens of microseconds( between 10 - 100 micro seconds). Should I set the thread to sleep at a constant period or should I work out some signalling mechanism between the threads? I would like mainly focusing on the performance issue. Any ideas?
Thanks.