D
Diego Diaz
Hello,
I'm facing the situation in which I need to cancel the
execution of a delegate that was started asynchronously
(through BeginInvoke and EndInvoke), but there is
no "CancelInvoke" or something like that. I noticed that
the interface for executing WebServices asynchronously
does have a method for this purpose, but unfortunately
there is a bug in .NET executing WebServices
asynchronously, so I had to wrap my proxy class with an
object so I can execute the WebService synchronously, but
in a different thread (through a local delegate);
however, now the problem is that I can't cancel it in a
safe manner (if I just ignore the running delegate,
subsequent executions of the proxy might start failing).
What do I need to do in order to cancel the execution of
an asynchronous delegate? Is it enough just to
call "Close" on the IAsyncResult pointer?
Thanks a lot in advance,
Diego Diaz
I'm facing the situation in which I need to cancel the
execution of a delegate that was started asynchronously
(through BeginInvoke and EndInvoke), but there is
no "CancelInvoke" or something like that. I noticed that
the interface for executing WebServices asynchronously
does have a method for this purpose, but unfortunately
there is a bug in .NET executing WebServices
asynchronously, so I had to wrap my proxy class with an
object so I can execute the WebService synchronously, but
in a different thread (through a local delegate);
however, now the problem is that I can't cancel it in a
safe manner (if I just ignore the running delegate,
subsequent executions of the proxy might start failing).
What do I need to do in order to cancel the execution of
an asynchronous delegate? Is it enough just to
call "Close" on the IAsyncResult pointer?
Thanks a lot in advance,
Diego Diaz