The future of concurrent programming

Brad Roberts braddr at puremagic.com
Tue May 29 22:52:12 PDT 2007


David B. Held wrote:
> Mike Capp wrote:
>> == Quote from Sean Kelly (sean at f4.ca)'s article
>>
>>> Transactions are another idea, though the common
>>> implementation of software transactional memory
>>> (cloning objects and such) isn't really ideal.
>>
>> Would genuine compiler guarantees regarding const (or invariant, or 
>> final, or
>> whatever it's called today) reduce the need for cloning?
> 
> Word-based STM doesn't require cloning except when necessary to preserve 
> logical consistency, and then it doesn't require whole-object cloning. 
> On the other hand, it may not always be as efficient because it only 
> knows about words and not objects.  It's all a trade-off.
> 
> Dave

Objects (or memory locations) that aren't changing don't get cloned. 
Constants are a stronger case of something not changing (because it 
can't by language rules).  So, const (or invariant, or final) really 
doesn't assist in STM in any way.



More information about the Digitalmars-d mailing list