Something needs to happen with shared, and soon.

Jonathan M Davis jmdavisProg at gmx.com
Wed Nov 14 19:24:13 PST 2012


On Thursday, November 15, 2012 04:12:47 Andrej Mitrovic wrote:
> On 11/15/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > From what I recall of what TDPL says
> 
> It says (on p.413) reading and writing shared values are guaranteed to
> be atomic, for pointers, arrays, function pointers, delegates, class
> references, and struct types containing exactly one of these types.
> Reals are not supported.
> 
> It also talks about automatically inserting memory barriers on page 414.

Good to know, but none of that really has anything to do with the casting, 
which is what I was responding to. And looking at that list, it sounds 
reasonable that all of that would be guaranteed to be atomic, but I think that 
the fundamental problem that's affecting usability is all of the casting that's 
typically required. And I don't see any way around that other than writing 
code that doesn't need to pass shared objects around or using templates very 
heavily.

- Jonathan M Davis


More information about the Digitalmars-d mailing list