Example of synchronizing threads using Interlocked class.