> On Oct. 8, 2014, 12:32 a.m., Jie Yu wrote:
> > Can you use unique_ptr directly now? If yes, I would suggest using 
> > unique_ptr directly in libprocess. Here are the reasons:
> > 
> > 1) We use lots of shared_ptr in libprocess. Mixing Owned with shared_ptr 
> > seems to be confusing.
> > 2) What if the implementation of Owned/Shared depends on dispatch, there 
> > will be cyclic dependencies (though it's not a problem now).
> > 3) I think directly using std::shared_ptr and std::unique_ptr is fine in 
> > libprocess (we even use pthread in libprocess:))
> > 
> > What do you think?

+1, I'd like to see movement toward `std::unique_ptr` and `std::shared_ptr` as 
well. Both are available in `gcc-4.4` and up.


- Michael


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


On Oct. 8, 2014, 12:15 a.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26289/
> -----------------------------------------------------------
> 
> (Updated Oct. 8, 2014, 12:15 a.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> replace shared_ptr with Owned where ownership is being passed.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/c++11/dispatch.hpp 
> 76da2828cf36b6143d627dac66f3e0cc4416bae4 
>   3rdparty/libprocess/include/process/defer.hpp 
> ebe6f2db47cab2a3306288d8ebabb720e7cd8976 
>   3rdparty/libprocess/include/process/delay.hpp 
> 487f652c9e9b7c8c3aa8b4edc9e59789cffd8da9 
>   3rdparty/libprocess/include/process/dispatch.hpp 
> bceda2a2ae8963921e8e19660243a8644feab227 
>   3rdparty/libprocess/include/process/event.hpp 
> bf689d7270df2c8f1f5c9165d2bbcfdca06e15a8 
>   3rdparty/libprocess/src/process.cpp 
> d30ed636ee24d0fe6e62f69a921307bde1f32765 
> 
> Diff: https://reviews.apache.org/r/26289/diff/
> 
> 
> Testing
> -------
> 
> make g++-4.4 and clang++-3.5
> make check clang++-3.5
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>

Reply via email to