mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Hindman <b...@berkeley.edu>
Subject Re: Review Request 62252: Added `process::Executor::execute()`.
Date Mon, 25 Sep 2017 19:48:08 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62252/#review186154
-----------------------------------------------------------


Fix it, then Ship it!




Just a few minor cleanups and then I'll commit it.


3rdparty/libprocess/src/tests/process_tests.cpp
Line 1212 (original), 1215 (patched)
<https://reviews.apache.org/r/62252/#comment262599>

    Let's use lambdas! I've seen you do this in previous patches and it's just easier to read
(than to have to specify the member function):
    
    ```
    .WillOnce(InvokeWithoutArgs([&]() {
      event1Called.decrement();
    }));
    ```



3rdparty/libprocess/src/tests/process_tests.cpp
Lines 1214-1215 (original), 1217-1218 (patched)
<https://reviews.apache.org/r/62252/#comment262600>

    As long as you're moving stuff around, let's move this and the second `CountDownLatch`
down to after the first `AWAIT_READY` too.



3rdparty/libprocess/src/tests/process_tests.cpp
Lines 1252 (patched)
<https://reviews.apache.org/r/62252/#comment262601>

    `AWAIT_READY(executor.execute(f1));`



3rdparty/libprocess/src/tests/process_tests.cpp
Lines 1264 (patched)
<https://reviews.apache.org/r/62252/#comment262602>

    `AWAIT_READY(executor.execute(std::bind(f2, 42)));`



3rdparty/libprocess/src/tests/process_tests.cpp
Lines 1274-1276 (patched)
<https://reviews.apache.org/r/62252/#comment262603>

    We can simplify these next ones: `AWAIT_EXPECT_EQ(f3Result, executor.execute(f3));`



3rdparty/libprocess/src/tests/process_tests.cpp
Lines 1286-1288 (patched)
<https://reviews.apache.org/r/62252/#comment262604>

    `AWAIT_EXPECT_EQ(f4Result, executor.execute(std::bind(f4, 42)));`


- Benjamin Hindman


On Sept. 21, 2017, 8:53 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62252/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2017, 8:53 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Benjamin Mahler, and Michael Park.
> 
> 
> Bugs: MESOS-7970
>     https://issues.apache.org/jira/browse/MESOS-7970
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a convenient interface to `process::Executor` to
> asynchronously execute arbitrary functions.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/executor.hpp cd2f2f03cba8a435f142b31def9f89a6cd61af73

>   3rdparty/libprocess/src/tests/process_tests.cpp 82efb2f8449e4cb13620cae1a49321fc42e2db60

> 
> 
> Diff: https://reviews.apache.org/r/62252/diff/6/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message