The new CCR is very well suited for this kind or arbitration. The runtime
is used in their new robotics stuff as that is heavily threaded. It is not
RTM yet, but the current bits work great. It is worth playing with anyway
and getting to know the Port<Tabstraction.
http://msdn.microsoft.com/msdnmag/is...s/default.aspx
--
William Stacey [MVP]
"archana" <tr**************@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
| Hi,
|
| thanks for your reply.
|
| I am calling begingGetresponse method of webrequest asynchronously.
| Actually i am calling 5 begingetresponse at a time to proess 5 urls and
| i want all 5 to gets aborted depending on option selected.
|
| I set timeout for this using registerwaitforsingleobject but this is
| not working properly.
|
| I want to abort this asynchronous call.
|
| How can i do this?
|
| thanks in advance.
|
| Willy Denoyette [MVP] wrote:
| Please try to answer following questions: what exactly is your async.
call
| doing and more importantly - why does it not return in a timely fashion.
| If your call has transitioned into unmanaged code (say a synch. socket
call
| or any other blocking call), and this unmanaged function waits for an IO
| completion which never happens, you are stuck. In this scenario, even a
| Thread.Abort will not terminate the thread, as Thread.Abort cannot abort
a
| thread that is executing outside the CLR. All you can do in such case is
| unload the Application domain, or terminate the process, Thread.Abort is
| never a solution and is only applicable if you are going to throw away
the
| AD anyway.
| >
| Willy.
| >
| >
| "archana" <tr**************@yahoo.comwrote in message
| news:11**********************@m73g2000cwd.googlegr oups.com...
| | Hi,
| |
| | thanks for your reply.
| |
| | In method i am calling set method at the end of whole procedure.
| |
| | But what i want is if process is not completed say withing 2 mins then
| | i need to forcefully abort it. So i called waitone on event with
| | passing time as 2 mins.
| |
| | So My question is after waitone will that function continue its
| | execution.
| |
| | Means like if we call thread.abort it stop execution of thread, is
| | there any similar functionlity for asychrnonous call abort.
| |
| | Any help will be truely appreciated.
| |
| | Thanks
| | Samuel R. Neff wrote:
| | ManualResetEvent.WaitOne() has three overloads, two of which take a
| | timeout parameter as either an int (milliseconds) or TimeSpan.
| | >
| | Also you could call Set() yourself from a different thread if
| | something happens that causes you not to want to wait any more--the
| | waiting code will continue execution just like the wait had timed
out.
| | >
| | HTH,
| | >
| | Sam
| | >
| | >
| | >
| | ------------------------------------------------------------
| | We're hiring! B-Line Medical is seeking Mid/Sr. .NET
| | Developers for exciting positions in medical product
| | development in MD/DC. Work with a variety of technologies
| | in a relaxed team environment. See ads on Dice.com.
| | >
| | >
| | >
| | >
| | On 21 Aug 2006 00:22:06 -0700, "archana"
<tr**************@yahoo.com>
| | wrote:
| | >
| | Hi all,
| |
| | I am having application in which i am doing asynchronous call.I am
| | using manualresetevent to wait for asynchronous call to complete.
| |
| | I want to stop asynchronous call after certain period of time.
| |
| | I want something like thread.abort for aborting aynchronous call.
| |
| | Can someone tell me way of aborting asynchronous call.
| |
| | Any help will be truely appreciated.
| |
| | thanks in advance.
| |
|