[ruby-core:63016] Re: [CommonRuby - Feature #8259] Atomic attributes accessors

From: Eric Wong <normalperson@...>
Date: 2014-06-09 11:06:50 UTC
List: ruby-core #63016
I'm not sure if setting the attribute on the ivar is a good way to go.
Entries in structs, arrays, hashes, etc may also benefit from atomic
operations (or at least I would like that).

Maybe something like:

	old = hash["foo"] x= new	# swap
	hash["foo"] ?x= old : new	# cas

In This Thread