What classification should shared objects in qeued thread pools have?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Thu Oct 1 14:12:24 UTC 2020
On Thursday, 1 October 2020 at 00:13:41 UTC, IGotD- wrote:
> For example completely lockless algorithms can often be a
> combination of atomic operations and also non-atomic operations
> on data members.
Also, atomic operations on members do not ensure the integrity of
the struct. For that you need something more powerful
(complicated static analysis or transactional memory).
I'm very wary of being able to cast away shared, it might
completely negate all the advertised (memory management)
optimization opportunities for shared.
For that to work you need some kind of "unshared" or "borrowed"
More information about the Digitalmars-d-learn