shared - i need it to be useful
aliak
something at something.com
Thu Oct 18 18:05:51 UTC 2018
On Thursday, 18 October 2018 at 17:23:36 UTC, Stanislav Blinov
wrote:
> On Thursday, 18 October 2018 at 17:10:03 UTC, aliak wrote:
>
>> Out of curiosity, when it comes to primitives, what could you
>> do under MP in void "atomicInc(shared int*)" that would be
>> problematic?
>>
>> void atomicInc(shared int*) {
>> // i.e. what goes here?
>> }
>
> 1. Anything if int* implicitly converts to shared int* (per
> MP), because then that function is indeed unsafe.
Right, but the argument is a shared int*, so from what I've
understood... you can't do anything with it since it has no
shared members. i.e. you can't read or write to it. No?
> 2. Only actual platform-specific implementation bugs otherwise,
> and these are beyond what `shared` can provide.
More information about the Digitalmars-d
mailing list