Lock-based queue