Reintroduced spin lock.
I'm not sure that it works fine. So it needs through tests.