Added implementation with spin-lock