Click here to Skip to main content
15,742,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My situation is

I have to complete 1 process and meanwhile if any other request come so
take that request also in process as well

try to run ( 15 to 20 ) process parallely
and more than 20 make it in Queue .

As any process gets completed so
take item in Queue to process in it and so on

In my mind i have 2 solution for that
1) wait call back 2) asyn call back

whats the difference between them
Should i prefer any of them or some thing else which is perfect

kindly suggest

1 solution

When the asyn method finishes processing, the AsyncCallback method is automatically called, where post processing stmts can be executed. With this technique there is no need to poll or wait for the asyn thread to complete.

WaitCallback represents a callback method that you want to execute on a ThreadPool thread. Create the delegate by passing your callback method to the WaitCallback constructor
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900