Added queue_size external function.