On 2014-04-02, 6:53 PM, Martin Thomson wrote:
On 2014-04-02, at 14:01, Ehsan Akhgari <ehsan.akhg...@gmail.com> wrote:

AtomicFetchAndSub(&mRefCnt, -1);

I think that I’ll join those who seem to favour member functions over statics, 
as you seem to prefer for some reason.

I'm open to using member functions and just agreed to doing so elsewhere in the thread.

If you want to avoid inventing names and such, how about copying from something 
that is known to work already:

http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/package-summary.html

.get() : T
.getAndSet(T) : T
.getAndIncrement() : T

The Java APIs are pretty aggressive at covering all options; no need to be so 
complete.  The names are sensible though.

Sure, but you need to convince Joshua on the names. :-) Any sane ones are good as far as I'm concerned.

Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to