----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46821/#review132594 -----------------------------------------------------------
LGTM. Can you add @mpark or @joris to the reviews for a second look as well. 3rdparty/libprocess/include/process/subprocess.hpp (line 141) <https://reviews.apache.org/r/46821/#comment196833> Can you add a comment here on why we need to take an Option<Shared> here? You can probably use the 2nd para in your description. - Vinod Kone On April 29, 2016, 9:37 a.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46821/ > ----------------------------------------------------------- > > (Updated April 29, 2016, 9:37 a.m.) > > > Review request for mesos, Alexander Rukletsov and Vinod Kone. > > > Bugs: MESOS-3335 > https://issues.apache.org/jira/browse/MESOS-3335 > > > Repository: mesos > > > Description > ------- > > While `FlagsBase` internally stores just maps of names and > flags, the functions stored in a `Flag` rely on the original type of > the `Flags` containing them (e.g., we perform dynamic casts to detect > their types). > > Since `Option<T>` stores `T` as a value (i.e., it cannot contain > reference types) any interface taking an `Option<T>` cannot rely on > polymorphic behavior of `T`. To make use of polymorphism we should > instead store e.g., a pointer type to avoid slicing. > > Here we change `Flags` arguments of `subprocess` to allow preserving > the original type so `Flag` function can work reliably. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/subprocess.hpp > 6ce1a827e36e0c65985e3928c89f51561fdd70cd > 3rdparty/libprocess/src/subprocess.cpp > bb0fcbcd0dfa455c8700247c5b4ca0473fd163c3 > 3rdparty/libprocess/src/tests/subprocess_tests.cpp > 727e940f12643974de4ff2734fba431b285b5de3 > > Diff: https://reviews.apache.org/r/46821/diff/ > > > Testing > ------- > > Tested on various platforms in internal CI. > > > Thanks, > > Benjamin Bannier > >
