I was going to bring up a similar discussion so I will just comment inline.
On Feb 11, 2013, at 9:12 AM, Summers Pittman <supittma(a)redhat.com> wrote:
We have three JIRA's[1] to add a cancel method to Pipe.
In Android (and presumably iOS and to a lesser extent JS) Pipes are shared among multiple
threads and each request exists in its own scope. (IE multiple threads can have multiple
requests running at one time).
When a "cancel" is called, which request is cancelled?
This is the exact issue I was going to bring up. Since JS uses promises, the straight
forward way to cancel the request is to call the abort() method already available in the
jqXHR returned by a call to read(), save(), remove(). That said, I would really rather not
add a method to JS for this since it would be nothing more than an extra layer around that
abort method, and also not something that would be available on the pipe itself but the
object returned by a call to one of its methods.
Another issue is that it would need to be clearly documented that calling cancel() (or
abort() or what ever) has no effect on the server so if you do a save() or remove() and
then call cancel(), that action will still take place on the the server.
I've attempted to address this (and some larger issues) here:
https://github.com/aerogear/aerogear.org/blob/pipe_spec/docs/specs/aeroge...
Summers
1: (898,901,895)
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev