shared not working!
ag0aep6g via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 3 22:26:19 PDT 2016
On 07/04/2016 07:16 AM, Hiemlick Hiemlicker wrote:
> But static isn't per instance, is it?
Sure isn't. __gshared isn't either.
> That means every thread created will have the same value of Paused.
> Calling Pause will pause all threads. That can't be right.
I don't know what exactly you're doing and if static would be correct or
not. Just saying that __gshared is closer to static shared than to
non-static shared.
> Shared should have no implication of static. If that was the case, all
> shared types would be static, would make them uses to have and to use a
> this.
shared doesn't imply static. But __gshared does. If your program works
correctly with __gshared, it seems to depend on the implied static.
> Unless static shared is different than static + shared?
No. It's just that.
More information about the Digitalmars-d-learn
mailing list