DIP60: @nogc attribute

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 18 08:56:45 PDT 2014


On Friday, 18 April 2014 at 10:06:35 UTC, Manu via Digitalmars-d 
wrote:
> D pointers are thread-local by default, you need to mark things 
> 'shared'
> explicitly if they are to be passed between threads. This is 
> one of the
> great advantages D has over C/C++/Obj-C.

There's nothing special about pointers in D. You can pass them 
between threads however you want. The type system has some 
constraints that you can *choose* to use/abuse/obey/disobey, but 
they definitely aren't in thread local storage unless they are 
global or static variables.


More information about the Digitalmars-d mailing list