asynch delegates - when is the WaitHandle signalled ?

G

Guest

I am looking at using delegates to perform an asynchronous call.
There will be a callback invoked at the end of the call.
The client thread will wait on the WaitHandle from IAsyncResult (which is
really a AsyncResult).

My question is, when exactly is this WaitHandle signalled - is it:

-when the asynchronous call finishes
OR
-when EndInvoke() is called (by the callback)

I need to know this, to synchronise the client thread and asynch thread.
This is so the asynch thread knows whether the client thread has timed out.

Is the behaviour the same on all versions of .NET ? (the documentation is
unclear, so it could implemented either way ?)

Thanks,

Sean
 

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