use spinlock to guard the loader queue