Replacing busy waiting with blocking call to insert on ring buffers.