RFC: reference counted Throwable

Ola Fosheim Grostad via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 11:52:58 PDT 2014


On Saturday, 20 September 2014 at 18:26:56 UTC, Ola Fosheim 
Grøstad wrote:
> On Saturday, 20 September 2014 at 18:18:05 UTC, Walter Bright 
> wrote:
>>
>> Please show me the inc/dec optimized x86 code.
>
> There's no optimization of the inc/dec, you use regular inc/dec 
> within a larger xbegin/xend block.

Actually you dont need to inc/dec if you do both in the 
transaction. You only need to read the refcount. If somebody else 
writes to the ref count the transaction fails.

So, you cannot succeed a transaction while somebody else decrease 
the ref count.

Sounds right?


More information about the Digitalmars-d mailing list