About MagmaCounter
Last updated at 9:28 pm UTC on 19 April 2011
A MagmaCounter is a shared counter that allows full concurrent access, lock-free. To create a new MagmaCounter:
myCounter := MagmaCounter new
To increment the counter:
myCounter increment: 10
adds 10 to the counter.
It can also be decremented:
myCounter decrement: 1
The counter always represents the total every client has incremented/decremented it.
For a demonstration, see #testMagmaCounter.