shared - i need it to be useful
Stanislav Blinov
stanislav.blinov at gmail.com
Thu Oct 18 17:23:36 UTC 2018
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.
2. Only actual platform-specific implementation bugs otherwise,
and these are beyond what `shared` can provide.
More information about the Digitalmars-d
mailing list