Could you clarify what you are trying to do a little more Could you post some code I'm somewhat confused as to what you are using. Are you using a CancelEventHandler event to perform some work and then expecting to be able to cancel the event request or are you using an async thread and trying to cancel the thread
one must has to exit the underlying operation by exiting its loop or what ever its doing inside. it must be done explicitly .The pattern only supports for providing event when the current async thread of the operation is either cancelled or completed.
i m talking about the EventBased Asynchronous pattern provided in C# 2.0 .They use AsyncperationManger class that manages the underlying asynchronous operations.Provides cancellation managemnt of that Async operation in AsyncEventArgs Class.
I build a sample code using that Async Pattern . what i was expecting that it should kill the async operation thread when i cancel the event and call the SendorPost Delegate provided.But it doesnt do so ...it bring the control back to the main thread where you can do some post operation work and leav the async thread running ..and the operation on that thread goes on ...Does this pattern is meant to do this ...just returning the control back to the originating thread and leaving the async thread behind ...then whats the purpose ...for providing this pattern if i have to kill my thread manually .
I will be verythank ful if this gets resolved . can post the sample code if u want . or you can google simply "Event based Asynchrount Pattern"
While using The Evant Based Async Pattern in C#2.0 . I did not find the the actual async thread killed when the application tries to cancel the Async thread.
Event Based Async Pattern Problem
MarkGrant
Could you clarify what you are trying to do a little more Could you post some code I'm somewhat confused as to what you are using. Are you using a CancelEventHandler event to perform some work and then expecting to be able to cancel the event request or are you using an async thread and trying to cancel the thread
Michael Taylor - 3/31/06
Brian Merz
Well
one must has to exit the underlying operation by exiting its loop or what ever its doing inside. it must be done explicitly .The pattern only supports for providing event when the current async thread of the operation is either cancelled or completed.
Thanks
Coëndou
Hi Taylor
i m talking about the EventBased Asynchronous pattern provided in C# 2.0 .They use AsyncperationManger class that manages the underlying asynchronous operations.Provides cancellation managemnt of that Async operation in AsyncEventArgs Class.
I build a sample code using that Async Pattern . what i was expecting that it should kill the async operation thread when i cancel the event and call the SendorPost Delegate provided.But it doesnt do so ...it bring the control back to the main thread where you can do some post operation work and leav the async thread running ..and the operation on that thread goes on ...Does this pattern is meant to do this ...just returning the control back to the originating thread and leaving the async thread behind ...then whats the purpose ...for providing this pattern if i have to kill my thread manually .
I will be verythank ful if this gets resolved . can post the sample code if u want . or you can google simply "Event based Asynchrount Pattern"
thanks in adance,
Tabish
snymanr
describing a little bit
While using The Evant Based Async Pattern in C#2.0 . I did not find the the actual async thread killed when the application tries to cancel the Async thread.
Any one knows abt this issue here ....
Thanks.