Using Interlocked instead of a lock

Small change :smile: