9 Replies Latest reply on Sep 6, 2013 4:44 AM by nva

    Feature suggestion/request: BatchCaller cancel

    nva

      I think the following could be quite handy:

       

      Use case:

       

      1. Large/expensive RPCs are grouped into a single round-trip with the BatchCaller.

      2. User input triggers the BatchCaller in 1.

      3. A second user input is received before the batch completes that makes the processing started in 1. obsolete.

       

      To save resources, it would be very handy if in step 3. a cancel could be called on the batch to stop all callbacks that haven't been called yet. Of course, with the understanding that the application state would be unpredictable as there would be no way knowing which callback has run and which has not.

       

      Typical scenario: tabbed application, each tab requires data from the server to render. User switches to another tab before the loading/initialisation of the tab finishes. Blocking the user input during loading not feasible.

       

      What do you think?

       

      Cheers,

       

      V.