shared: Has anyone used it without a lot of pain?

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 6 02:00:33 PDT 2017


On Wednesday, 5 April 2017 at 14:01:24 UTC, Guillaume Piolat 
wrote:
> My pet peeve with shared is the RoI.

Risk of infection?

> You were supposed to use it whenever something is "shared 
> across threads". My problem with it is with the RoI of putting 
> entire object graphs under that type constructor.

If you don't want to share data between threads and have an 
option to do so, sure do it; shared is for the case when you want 
to share data.


More information about the Digitalmars-d mailing list