Atomic Read and Write
declare Counter =
local C = {NewCell 0}
in
fun {$}
OldValue NewValue
in
{Exchange C OldValue NewValue}
NewValue = OldValue + 1
NewValue
end
{Show {Counter}} % 1
{Show {Counter}} % 2
Previous slide
Next slide
Back to first slide
View graphic version