Very limited shared promotion

Manu turkeyman at gmail.com
Sat Jun 22 23:44:35 UTC 2019


On Sun., 23 Jun. 2019, 7:08 am Jonathan M Davis via Digitalmars-d, <
digitalmars-d at puremagic.com> wrote:

> On Saturday, June 22, 2019 2:52:33 PM MDT Timon Gehr via Digitalmars-d
> wrote:
> > On 22.06.19 22:32, Jonathan M Davis wrote:
> > > As long as @safe code doesn't actually benefit from the implicit
> > > conversion to scope shared, it makes no sense to me to have it happen.
> > > The entire point is for it to be used with @trusted stuff. And if
> > > that's the case, then why not just have the cast be explicit and
> > > @trusted like it normally would be?
> > Why would @safe code not benefit? Manu's use case is @safe code calling
> > into a @trusted library.
>
> Because if all of the code is @safe, then the fact that it was converted to
> scope shared gains you nothing. It's not really shared across threads, and
> it doesn't enable any useful operations.


Not being required to duplicate every threadsafe function is a huge
advantage. We went on about this for weeks 6 months ago.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20190623/4a30411a/attachment.html>


More information about the Digitalmars-d mailing list