Re: compilation error with shared ReadWriteMutex

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/30/16 8:41 AM, jj75607 wrote: On Thursday, 30 June 2016 at 12:25:54 UTC, Steven Schveighoffer wrote: On 6/30/16 8:18 AM, jj75607 wrote: [...] You don't need to mark this shared, because the entire class is shared, all members are implicitly marked shared. [...] Thanks! Is this

Re: compilation error with shared ReadWriteMutex

2016-06-30 Thread jj75607 via Digitalmars-d-learn
On Thursday, 30 June 2016 at 12:25:54 UTC, Steven Schveighoffer wrote: On 6/30/16 8:18 AM, jj75607 wrote: [...] You don't need to mark this shared, because the entire class is shared, all members are implicitly marked shared. [...] Thanks! Is this a compilation only 'cast' with no

Re: compilation error with shared ReadWriteMutex

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/30/16 8:18 AM, jj75607 wrote: I wrote shared class with rwmutex import core.sync.rwmutex; shared class Shared { ReadWriteMutex rwmutex; int[] items; this() { rwmutex = new ReadWriteMutex(); } } But it fails with: Error: cannot implicitly

compilation error with shared ReadWriteMutex

2016-06-30 Thread jj75607 via Digitalmars-d-learn
I wrote shared class with rwmutex import core.sync.rwmutex; shared class Shared { ReadWriteMutex rwmutex; int[] items; this() { rwmutex = new ReadWriteMutex(); } } But it fails with: Error: cannot implicitly convert expression (new