[ 
https://issues.apache.org/jira/browse/MESOS-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158588#comment-14158588
 ] 

Dominic Hamon commented on MESOS-1861:
--------------------------------------

I imagine that instead of using process::Shared and getting that safety, people 
will use process::Shared until they need mutability, and then will prefer 
std::shared_ptr anyway. We certainly have std::shared_ptr in the codebase so I 
don't think we're getting the safety you think we are.

I just looked at the usage of both: process::Shared is used by process::Owned, 
the replicated log, and tests. std::shared_ptr is used everywhere.

I'd like to reduce the complexity of the primitives available to use. As such, 
perhaps it is better to _always_ prefer process::Shared over std::shared_ptr. 
What do you think?

This would be unfortunate, given that we want to track modern C++ as closely as 
possible to encourage contributions from people, and the further we are from 
the standard, the harder that is. However, I agree that safety in our complex 
system is paramount.


> deprecate process::Shared
> -------------------------
>
>                 Key: MESOS-1861
>                 URL: https://issues.apache.org/jira/browse/MESOS-1861
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: Dominic Hamon
>            Priority: Minor
>              Labels: c++11, newbie
>
> Deprecate {{process::Shared}} in favour of {{std::shared_ptr}} or 
> {{std::tr1::shared_ptr}} from stout/memory.hpp.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to