in pull_all() and read_request(), respect ctx->stop_flag()