Hi!

On Oct 11, 2007, at 10:14 PM, Dustin Sallings wrote:

You don't need a mutex if you have CAS. Java's AtomicInteger is implemented using a volatile integer (volatile mostly means that it can't be stored in a CPU cache, but also is used to establish a happens-before relationship with other threads on reads and writes).

Yep, you can do CAS if supported. I mentioned to Brad back at FooCamp that he should take a look at doing this for Memcache. I think I saw where someone had a patch for this.

Cheers,
        -Brian

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
http://exploitseattle.com/    <-- Fun
_______________________________________________________
You can't grep a dead tree.


Reply via email to