Re: Shared with synchronized

2021-04-19 Thread Per Nordlöw via Digitalmars-d-learn
On Monday, 4 March 2019 at 00:07:39 UTC, r-const-dev wrote: I'm trying to implement a thread safe class, guarding data access with synchronized and atomicOp. To get more help with memory safety checking from the compiler, please instead use `@safe` as ```d import std.typecons : Nullable;

Re: Shared with synchronized

2019-03-04 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, March 3, 2019 5:07:39 PM MST r-const-dev via Digitalmars-d-learn wrote: > On Sunday, 3 March 2019 at 22:35:54 UTC, r-const-dev wrote: > > I'm trying to implement a thread safe class, guarding data > > access with synchronized and atomicOp. > > > > Inside the class I'm using non-shared

Re: Shared with synchronized

2019-03-03 Thread r-const-dev via Digitalmars-d-learn
On Sunday, 3 March 2019 at 22:35:54 UTC, r-const-dev wrote: I'm trying to implement a thread safe class, guarding data access with synchronized and atomicOp. Inside the class I'm using non-shared fields, such as Nullable, but I guarantee the thread safety using synchronized. How can I tell

Shared with synchronized

2019-03-03 Thread r-const-dev via Digitalmars-d-learn
I'm trying to implement a thread safe class, guarding data access with synchronized and atomicOp. Inside the class I'm using non-shared fields, such as Nullable, but I guarantee the thread safety using synchronized. How can I tell the compiler to allow using non-shared fields/methods inside