How to utilize idle CPU cycles during WebService invocation

sksdes

New Member
I am invoking a web service, which displays the result in the UpdatePanel. The web sevice returns the result in approximately 30 sec. to 1 min. During this time interval I am currently displaying UpdateProgress Bar.My goal is to utilize idle processor time & do some useful operation in foobar() method, out of following approach which one fits best in current scenario -[*]Call the web sevice asynchronously using BeginAsync keep doing othertask until BeginAsync invokes its callback method.[*]Add webservice operation inside a thread, and use QueueUserWorkItemto enque this thread to a ThreadPool. (I will have to use WaitAny inthis case, since as soon as webservice returns data, I need toterminate thread running foobar method.)[*]I wonder whether it is possible in asp.net to callback a methodonce UpdataProgress control gets triggered and terminate this, whenthis is done.
 
Back
Top