replace ring buffer with SPSC queue