Re: Compiling shared example.

2012-10-28 Thread Ali Çehreli
On 10/28/2012 02:46 AM, Peter Sommerfeld wrote: > But I wonder why I > have do declare the variables shared if the data are declared > to be shared. Is that a shortcoming of the current compiler ? I had to look this one up. According to the spec, a shared struct does not mean that the variables

Re: Compiling shared example.

2012-10-28 Thread Peter Sommerfeld
Am 28.10.2012, 08:06 Uhr, schrieb Ali Çehreli : On 10/26/2012 02:22 PM, Peter Sommerfeld wrote: To learn about shared attribute I've copied nearly verbatim an example from Andreis book. The code: import core.atomic; struct Data{ int value; } shared struct SharedStack(T) { private shared str

Re: Compiling shared example.

2012-10-28 Thread Ali Çehreli
On 10/26/2012 02:22 PM, Peter Sommerfeld wrote: To learn about shared attribute I've copied nearly verbatim an example from Andreis book. The code: import core.atomic; struct Data{ int value; } shared struct SharedStack(T) { private shared struct Node{ T data; Node* next; this(T value){data =

Compiling shared example.

2012-10-26 Thread Peter Sommerfeld
To learn about shared attribute I've copied nearly verbatim an example from Andreis book. The code: import core.atomic; struct Data{ int value; } shared struct SharedStack(T) { private shared struct Node{ T data; Node* next; this(T value){data = value;}; } private Node* roo