[
https://issues.apache.org/jira/browse/MESOS-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158572#comment-14158572
]
Benjamin Hindman commented on MESOS-1861:
-----------------------------------------
The benefit of only allowing const access is that we restrict the sharing of
types to make them safer in our concurrent actor based environment! Forcing
people to use std::shared_ptr<const T> is error prone, and it should be very
rare (or we should avoid at all costs) using std::shared_ptr<T> without the
const. Moreover, the ability to upgrade from Shared to Owned is highly useful
in situations where you want to guarantee that something that was shared is now
unique (and is already used in the code base). It's unclear if we'll ever get
that kind of functionality from std::shared_ptr (where as converting a
std::unique_ptr to a std::shared_ptr is trivial, hence it's existence).
> 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)