• Samuel Huang's avatar
    [Supersize] Add kwargs support to concurrent.BulkForkAndCall(). · 4dd7097d
    Samuel Huang authored
    concurrent.BulkForkAndCall(func, arg_tuples) calls |func()| with
    arguments given by |arg_tuples|, which stores arguments over
    independent forked calls as a list of tuples. Previously this requires
    common parameters (e.g., tool_prefix) to be present in each tuple, and
    decreases flexibility for |arg_tuples| preparation code.
    
    This CL adds |kwargs| parameter to BulkForkAndCall(), thereby allowing
    common parameters to be given once. As seen in the test changes, a
    minor caveat is that |func()| will need to make common parameters
    appear at end of argument list.
    
    Bug: 723798
    Change-Id: I9aa91b6081b8fe8fa9c87a9ae1cb959d3f17e9df
    Reviewed-on: https://chromium-review.googlesource.com/1135204
    Commit-Queue: Samuel Huang <huangs@chromium.org>
    Reviewed-by: default avataragrieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#574934}
    4dd7097d
concurrent.py 7.57 KB