Shared, but synchronisation is not desired for multithreading

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 5 00:41:59 PDT 2016


On Saturday, June 04, 2016 16:56:21 tcak via Digitalmars-d wrote:
> On Saturday, 4 June 2016 at 15:51:22 UTC, Alex Parrill wrote:
> > (It also doesn't help that many "thread-safe" functions in D
> > aren't marked as shared where they really ought to be, ex. all
> > the functions in core.sync.mutex)
>
> And you have to be continuously casting the methods of Mutex,
> Thread, Condition, and others wherever you use them in a shared
> class which makes a mess everywhere. Only a person who uses those
> classes in many occasions can understand this situation. Thus, I
> have started this topic.

Some of those methods really should be marked with shared, and it doesn't
make sense that they aren't, but in the past, the primary maintainer for
some of that stuff at the time didn't want to mark anything as shared,
because he was afraid that shared was going to change. And no one since has
come along and done it either.

- Jonathan M Davis



More information about the Digitalmars-d mailing list