Is it possible to cancel an RPC call that is assigned to an AsyncToken with responders?
Asked
Active
Viewed 383 times
0
-
2possible duplicate of [Flex : Is it possible to stop a romote call?](http://stackoverflow.com/questions/9365165/flex-is-it-possible-to-stop-a-romote-call) – JeffryHouser Apr 03 '12 at 01:24
1 Answers
1
I believe that the AsyncToken has a reference to the Operation in the IMessage Body. If not, you'll need to add it manually. I don't think you can cancel a specific call this way--it looks like it would only cancel the most recent.

Amy Blankenship
- 6,485
- 2
- 22
- 45
-
I see. The problem is that when multiple calls to the same operation are called they sometimes overlap and so the first call isn't always the first to return a result. And so I want to cancel any call on the same AsyncToken or operation when a result is received. – Francisc Apr 03 '12 at 10:17
-
1Potentially, you could extend Operation and AsyncToken to do what you want. – Amy Blankenship Apr 03 '12 at 10:41
-
I considered doing that or even simpler, have a control variable that tells the app weather or not to do something with the freshly received data. I was just looking to see if there's an out-of-the-box way of doing this. Thank you. – Francisc Apr 03 '12 at 12:28