thready
asked on
WaitForMultipleObjects - 2 timeouts?
Hi Experts,
I have the need for 2 separate timeouts as events coming back from WaitForMultipleObjects. The normal timeout with WAIT_TIMEOUT is done.. How can I add a 2nd timeout event? Perhaps a handle with some timer function that sets the event after a certain amount of time?
Thanks!
Mike
I have the need for 2 separate timeouts as events coming back from WaitForMultipleObjects. The normal timeout with WAIT_TIMEOUT is done.. How can I add a 2nd timeout event? Perhaps a handle with some timer function that sets the event after a certain amount of time?
Thanks!
Mike
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do the timeouts depend on which event fired? If so, you could use the event indicator that is returned to select the next timeout.
Alternatively, you could 'WaitForSingleObject()' in two separate threads...
Alternatively, you could 'WaitForSingleObject()' in two separate threads...
ASKER
Yeap... I guess that's the best I can do with this. Not giving up yet though... :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! I'll be doing a hybrid of the "best solution". There's one of the timeouts that is so unimportant and will be guaranteed to run less often than the other, so I'll just check if it's "time for that event too"... kinda thing... :-)
ASKER