> Because if the device did not respond for some reason, the main thread > would be blocked forever - it needs to timeout so that the main > program can move on. For example, say the user is trying to just see > what the contents of register 56 are. > They click the Read button, and that starts the comms. It must either > return the value that was there if the device responds in time, or it > must pop up a message to the user saying that the device did not > respond (timeout). It MUST NOT get locked up waiting for a > non-existent response.
Isn't there an API which waits for some comms, and returns when it has happened or when a timeout has occurred? Something like WaitForSingleObject( ), maybe? ------------- Ehsan Akhgari List Owner: [EMAIL PROTECTED] [ Email: [EMAIL PROTECTED] ] [ WWW: http://www.beginthread.com/Ehsan ] But the thought is one thing, the deed another, and the idea of the deed still another. The wheel of causality does not roll between them. -Thus Spoke Zarathustra, F. W. Nietzsche
