implementing select between mutex and spinlock