Search Results

Search found 1 results on 1 pages for 'stewsha'.

Page 1/1 | 1 

  • Can you have too many Delegate.BeginInvoke calls at once?

    - by stewsha
    I am cleaning up some old code converting it to work asynchronously. psDelegate.GetStops decStops = psLoadRetrieve.GetLoadStopsByLoadID; var arStops = decStops.BeginInvoke(loadID, null, null); WaitHandle.WaitAll(new WaitHandle[] { arStops.AsyncWaitHandle }); var stops = decStops.EndInvoke(arStops); Above is a single example of what I am doing for asynchronous work. My plan is to have close to 20 different delegates running. All will call BeginInvoke and wait until they are all complete before calling EndInvoke. My question is will having so many delegates running cause problems? I understand that BeginInvoke uses the ThreadPool to do work and that has a limit of 25 threads. 20 is under that limit but it is very likely that other parts of the system could be using any number of threads from the ThreadPool as well. Thanks!

    Read the article

1