namespace Unosquare.Swan { using System; using Abstractions; /// /// Represents an atomically readable or writable integer. /// public class AtomicInteger : AtomicTypeBase { /// /// Initializes a new instance of the class. /// /// if set to true [initial value]. public AtomicInteger(int initialValue = default) : base(Convert.ToInt64(initialValue)) { // placeholder } /// protected override int FromLong(long backingValue) => Convert.ToInt32(backingValue); /// protected override long ToLong(int value) => Convert.ToInt64(value); } }