Re: Problems with "shared"

2016-10-10 Thread Satoshi via Digitalmars-d-learn
On Sunday, 9 October 2016 at 21:32:23 UTC, ag0aep6g wrote: On 10/09/2016 10:57 PM, jython234 wrote: 1. Where do I use the "shared" keyword? What doesn't work is creating an unshared object of a class that only has a shared constructor. To create both shared and unshared objects, you need

Re: Problems with "shared"

2016-10-09 Thread ag0aep6g via Digitalmars-d-learn
On 10/09/2016 10:57 PM, jython234 wrote: 1. Where do I use the "shared" keyword? Mainly on data, I'd say. But I'm only dabbling in concurrency stuff. I've done things like making whole classes shared, which doesn't seem to make the member methods shared either. It does make the methods

Re: Problems with "shared"

2016-10-09 Thread cym13 via Digitalmars-d-learn
On Sunday, 9 October 2016 at 20:57:40 UTC, jython234 wrote: Hello, I've recently started a project in D, one which I plan to take advantage of concurrency. This means I will need to use the shared keyword. However, I have been having a few problems: 1. Where do I use the "shared" keyword?

Problems with "shared"

2016-10-09 Thread jython234 via Digitalmars-d-learn
Hello, I've recently started a project in D, one which I plan to take advantage of concurrency. This means I will need to use the shared keyword. However, I have been having a few problems: 1. Where do I use the "shared" keyword? I've done things like making whole classes shared, which