On 10 December 2011 19:21, Manu <[email protected]> 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);
}
}