----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55317/#review181636 -----------------------------------------------------------
Ship it! Some more description here would be great, i.e. is this fixing a bug due to the lack of loop usage? Or is this purely a cleanup, etc. 3rdparty/libprocess/src/socket.cpp Lines 157 (patched) <https://reviews.apache.org/r/55317/#comment257261> This actually doesn't need to be a shared_ptr, you could do this: ``` string buffer; return loop( None(), [=]() { ... }; [=]() mutable { ... buffer.append(...); ... }); ``` Since the function will work off a single copy of the variable, this is a pretty typical pattern for working off the same variable across invocations of the lambda from what I've found. 3rdparty/libprocess/src/socket.cpp Lines 162 (patched) <https://reviews.apache.org/r/55317/#comment257262> `s/{/ {/` - Benjamin Mahler On Jan. 8, 2017, 7:44 a.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55317/ > ----------------------------------------------------------- > > (Updated Jan. 8, 2017, 7:44 a.m.) > > > Review request for mesos and Jie Yu. > > > Repository: mesos > > > Description > ------- > > Used loop in SocketImpl. > > > Diffs > ----- > > 3rdparty/libprocess/src/socket.cpp 457c5ff5e1270dd48f63c88fb99385399cc17f9f > > > Diff: https://reviews.apache.org/r/55317/diff/2/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
