mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Mann" <g...@mesosphere.io>
Subject Re: Review Request 37821: Join threads in libprocess when shutting down.
Date Fri, 28 Aug 2015 01:38:47 GMT


> On Aug. 27, 2015, 11:35 p.m., Neil Conway wrote:
> > 3rdparty/libprocess/src/process.cpp, line 2195
> > <https://reviews.apache.org/r/37821/diff/3/?file=1056787#file1056787line2195>
> >
> >     Why "const long& cpus", rather than just "long cpus"?
> >     
> >     Anyway, I think it might be better to move the calculation of "cpus" (along
with the explanatory comment) into init_threads().

I originally left the cpu calculation outside of init_threads() because it's used later on
in a log message, but I agree that it's a nicer to put it in there, so I let init_threads()
return cpus, leaving it as const since it shouldn't be altered if it's going to continue reflecting
the number of processing threads created.


> On Aug. 27, 2015, 11:35 p.m., Neil Conway wrote:
> > 3rdparty/libprocess/src/process.cpp, line 2205
> > <https://reviews.apache.org/r/37821/diff/3/?file=1056787#file1056787line2205>
> >
> >     std::cref, assuming you can change the parameter to const ref above.

Thanks Neil! Comments addressed.


- Greg


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


On Aug. 28, 2015, 1:34 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 1:34 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and switched to 'mcypark'.
> 
> 
> Bugs: MESOS-3158
>     https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/event_loop.hpp 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
>   3rdparty/libprocess/src/process.cpp 755187c8761137cb2bf2f7295b29a63f63c68bc6 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> -------
> 
> After configuring with both "../configure" and "../configure --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of libprocess,
try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests --gtest_filter=ProcessTest.Spawn;
done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


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