Hello Roy,
Thanks for your post. I reviewed your question and the article you pointed
to, and now I'd like to share the following information with you:
The article "Time-Out Usage" is providing the guidelines when one
developing a class library. It suggests us that, for example:
1. How to let client provide time-out value: it recommends a parameter to
the method call instead of a property in our class library.
2. Type for time-out value: it recommends TimeSpan structure.
3. What to do when a time-out expires: it recommends throw an exception
instead of returning an error code.
... and much more recommendations.
in time?
Generally speaking, when a method need to make asynchronous calls to other
components (say, .NET Remoting, etc) which may be completed in an
unpredictable manner, we can offer it with a time-out parameter in case
that the underlying calls may take too much time or will not return. So,
it's up to the your method implementation which determine if the operation
will complete in time. You method can pass the time-out value down to
underlying asynchronous calls. For example, you can call WaitOne with
time-out value on the AsyncWaitHandle of an asynchronous operation.
WaitHandle.WaitOne Method (TimeSpan, Boolean)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemthreadingwaithandleclasswaitonetopic3.asp
IAsyncResult.AsyncWaitHandle Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemIAsyncResultClassAsyncWaitHandleTopic.asp
Does this answer your question?
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! --
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.