spsc_bounded queue and minor changes