Couchbase Interview Question

Implement a spin-lock using c++ to demonstrate its usage