|
-
Aug 11th, 2005, 10:28 PM
#1
Thread Starter
Junior Member
End Async Call
Hi,
Within a loop I have begin and invoke on a delegate.
ArrayList aresult = new ArrayList();
foreach(string companyName in companies)
{
aresult.Add(dlgt.BeginInvoke(companyName, amount, null, null));
}
The method is working correctly but I don't know how to end the invoke.
I did have this code in but it isn't always waiting for the result to complete. It doesn't seem to be waiting long enough.
foreach(IAsyncResult ar in aresult)
{
if(ar.IsCompleted == false)
ar.AsyncWaitHandle.WaitOne();
}
Do I need a callback or do I have to wait for the result to complete using a difference method.
Thanks
CD
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|