DIP74 - where is at?
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 13 11:40:47 PDT 2015
On Tuesday, 13 October 2015 at 16:04:07 UTC, Ola Fosheim Grøstad
wrote:
> _loosely_ translated:
>
> isolated: void*
> transition: const T*
> reference: T*
> value: immutable T*
> box: globally as shared const T*, locally as shared T*
> tag: shared T*
The above turned out rather allegorical (and possibly confusing),
the following is a lockfree interpretation that is a little bit
more useful and somewhat more accurate:
ISOLATED: Unique!T
referable as void*, shared void*
transferrable to other threads
TRANSITION: Unique!T
referable as const T*, void*, shared void*
convertible to immutable T*
REFERENCE: T*
referable as T*, const T*, void*, shared void*
VALUE: immutable T*
referable as immutable T*, const T*, shared const T*, void*,
shared void*
shareable with other threads
BOX: const T*
referable as const T*, void*, shared void*
aliasing with T*, immutable T*
TAG: void T* or shared void*
referable as void T*, shared void*
aliasing with all types as it is a pure identity
Then we can do a new interpretation with locking/synchronization
and get something like:
LOCKED BOX: shared const T*
referable as shared const T*, void*, shared void*
aliasing with shared T*, immutable T*
LOCKED TAG: shared T*
referable as shared T*, shared const T*, void T*, shared void*
More or less...
More information about the Digitalmars-d
mailing list