Re: I can share non shared things?

2018-06-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/19/18 4:09 PM, gdelazzari wrote: So, let's say I have this code https://run.dlang.io/is/CaMJjd It doesn't compile, and that makes sense since myNotSharedObject is... not shared. So I can fix it by making the class shared and making a shared instance of it, like this

I can share non shared things?

2018-06-19 Thread gdelazzari via Digitalmars-d-learn
So, let's say I have this code https://run.dlang.io/is/CaMJjd It doesn't compile, and that makes sense since myNotSharedObject is... not shared. So I can fix it by making the class shared and making a shared instance of it, like this https://run.dlang.io/is/hoMFD1 And that's how shared is