synchronized - shared but actually useful
Stanislav Blinov
stanislav.blinov at gmail.com
Wed Oct 31 09:41:58 UTC 2018
On Wednesday, 31 October 2018 at 09:36:22 UTC, FeepingCreature
wrote:
> it seems like it should at least be possible to require that
> the Thread runner only accesses shared data, by limiting it to
> take a pure function that only has synchronized-class
> parameters. Well, it would be, if there was a trait for
> synchronized classes, but that seems like it'd be much easier
> to add.
And so you're jumping from your "simple oop cases" to "let's
infect the runtime with a narrow-minded view of thread-safety and
inflict synchronization on everyone using threads"? And what if
anyone, deity forbid, wants to pass data that is not actually
mutex-protected, because they happen to know that there's a lot
more to synchronizing data access than that?
More information about the Digitalmars-d
mailing list