shared - no read/write access
Kagamin
spam at here.lot
Tue Mar 19 21:20:58 UTC 2019
On Tuesday, 19 March 2019 at 20:08:37 UTC, Manu wrote:
> Last time we talked about shared, I think we all agreed on one
> thing; shared should hot have read/write access to data members.
>
> Does anyone know how to implement this? I would really like to
> try some important experiments with shared if it worked.
shared qualifier provides a guarantee that thread local data is
thread local, it doesn't provide safety for concurrency, not
supposed to, because it's not realistically feasible at such low
level, and attempts to do it like yours only add noise,
complicate reasoning and make errors only more likely. Normally
it's unshared data that should have a qualifier, because that's
actually a feature being provided, but because it would be a
nuisance, the opposite was done.
More information about the Digitalmars-d
mailing list