<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I was going to bring up a similar discussion so I will just comment inline.<div><br><div><div>On Feb 11, 2013, at 9:12 AM, Summers Pittman &lt;<a href="mailto:supittma@redhat.com">supittma@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  
  <div bgcolor="#FFFFFF" text="#000000">
    We have three JIRA's[1] to add a cancel method to Pipe.<br>
    <br>
    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.&nbsp; (IE multiple threads can have multiple requests running at
    one time).<br>
    <br>
    When a "cancel" is called, which request is cancelled? <br></div></blockquote><div><br></div>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.</div><div><br></div><div>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.<br><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">
    &nbsp;I've attempted to address this (and some larger issues) here:
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="https://github.com/aerogear/aerogear.org/blob/pipe_spec/docs/specs/aerogear-client-pipe/index.markdown">https://github.com/aerogear/aerogear.org/blob/pipe_spec/docs/specs/aerogear-client-pipe/index.markdown</a><br>
    <br>
    <br>
    Summers<br>
    <br>
    1: (898,901,895)<br>
  </div>

_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></div></body></html>