use spinlocks for queue