What exactly shared means?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 5 11:57:01 PST 2015


On Monday, January 05, 2015 12:59:26 via Digitalmars-d-learn wrote:
> I am also not overly happy with D making TLS default. That means
> new threads instantiate a lot of unused memory if the workload is
> heterogeneous (different threads do different type of work). TLS
> only make sense for things that all threads need.

Well, if you don't like the choice of TLS by default, then you're going to
be unhappy with shared and its related issues regardless. Personally, I
think that having TLS be the default is a fantastic improvement over C++ and
that it results in much cleaner and safer code, especially since the vast
majority of code only lives on one thread anyway if you're dealing with
threads cleanly. But it's definitely true that what we're up to is an
experiment in how to handle TLS and shared storage, and by no means have we
gotten it perfect.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list