Add missing file
Replace spin lock with an AutoResetEvent