Time-Out Usage

R

Roy Chastain

There is an article on in the .Net Framework Reference under the Design Guidelines for Class LIbrary Developers with a title of
Time-Out Usage.

Can someone please elaborate more on what this article is suggesting?

How is the method supposed to know that the operation has not completed in time?

Thanks
 
G

Gary Chang

Hi Roy,

Currently I am looking for somebody who could help you to clarify this
problem. We will reply here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
T

Tian Min Huang

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.
 
R

Roy Chastain

Yes, it answers my questions. It is what I thought it was, but I was hoping it was more.

May I respectively suggest that the article in question either be removed or expanded a lot.

Thanks
 
T

Tian Min Huang

Hi Roy,

Thanks a lot for your feedback which I will report to the corresponding
documentation team.

Have a nice day!

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top