rename queue_out to write_queue, queue_in to read_queue