Yes, but you still have the problem of deciding if your sleeping thread woke up first, or if you received the data first. If you do it as one operation (a wait with a timeout factor), then you just have to check if the result is "data complete" or "timeout". This may well be in it's own thread, but having a second thread that just acts as a timeout generator seems a bit excessive.
Originally Posted by Elysia
Again, it would be much easier to recommend something if we understand how the application actually works.
I agree on that one.
Originally Posted by matsp