• Lewis Baker's avatar
    Add CancellationToken support to collectAll() · b1ac6a22
    Lewis Baker authored
    Summary:
    The `collectAll()`, `collectAllRange()` and `collectAllWindowed()` functions now cancel their subtasks when either the parent task is cancelled or when any of the subtasks fail with an exception.
    
    The `collectAllTry()`, `collectAllTryRange()` and `collectAllTryWindowed()` functions now cancel their subtasks if the parent task is cancelled, but not if the child tasks fail with an exception.
    
    The logic between the distinction here is that if you are calling one of the 'try' functions then you are intending to handle partial failure and so probably want each of the operations to run to completion independently of the others.
    
    Reviewed By: kirkshoop
    
    Differential Revision: D16820619
    
    fbshipit-source-id: 5c203b41592a0145ff7be1c609dfccd39c41a3df
    b1ac6a22
Collect.h 12.6 KB