d-programming-language.com

Manu turkeyman at gmail.com
Sat Dec 10 09:32:11 PST 2011


On 10 December 2011 19:21, Manu <turkeyman at gmail.com> wrote:

> Okay, so is this the official documentation for the language?
> Is there somewhere else I should be looking?
>
> I ask because literally 50% if things I've looked up in the last 2 days
> are undocumented.
> Many of them have some heading reserved, with no content.
>
> Here are some examples:
> immutable Attribute __gshared Attribute shared Attribute inout Attribute
> These would appear to be rather important keywords... I'd like to know
> what they do :)
>
> I currently have this error, and no idea what it's hassling me about, but
> I'm suspecting I need to put 'shared' somewhere, though I don't really know
> how it works...
>   C:\Program Files
> (x86)\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(329): Error:
> static assert  "Aliases to mutable thread-local data not allowed."
>

snip...

class Group
{
Tid tid;
uint id;
Socket[] sockets;
};

shared Group[uint] activeGroups;

...later...
{
Group group = activeGroups[id];

// if the connection represents a new group
if(group.id == 0)
{
group.id = id;
group.tid = spawn(&groupThread, group);
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111210/f9e5c7ed/attachment-0001.html>


More information about the Digitalmars-d mailing list