improved the atomic example
even better spin locks