From: Tudor Bosman Date: Thu, 7 Mar 2013 15:45:16 +0000 (-0800) Subject: Add CHECK for out-of-range minRequests X-Git-Tag: v0.22.0~1043 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30313905400f94a57c6bf502ce6a1ed0d8888440;p=folly.git Add CHECK for out-of-range minRequests Test Plan: async_io_test Reviewed By: philipp@fb.com FB internal diff: D730100 --- diff --git a/folly/experimental/io/AsyncIO.cpp b/folly/experimental/io/AsyncIO.cpp index 16473e7f..addcc7e1 100644 --- a/folly/experimental/io/AsyncIO.cpp +++ b/folly/experimental/io/AsyncIO.cpp @@ -154,6 +154,7 @@ void AsyncIO::submit(Op* op) { Range AsyncIO::wait(size_t minRequests) { CHECK(ctx_); CHECK_EQ(pollFd_, -1) << "wait() only allowed on non-pollable object"; + CHECK_LE(minRequests, pending_); return doWait(minRequests, pending_); }