*/
size_t capacity() const { return capacity_; }
+ /**
+ * Return the accumulative number of submitted I/O, since this object
+ * has been created.
+ */
+ size_t totalSubmits() const { return submitted_; }
+
/**
* If POLLABLE, return a file descriptor that can be passed to poll / epoll
* and will become readable when any async IO operations have completed.
std::atomic<bool> ctxSet_;
std::mutex initMutex_;
- std::atomic<ssize_t> pending_;
- const ssize_t capacity_;
+ std::atomic<size_t> pending_;
+ std::atomic<size_t> submitted_;
+ const size_t capacity_;
int pollFd_;
std::vector<Op*> completed_;
};
} // namespace folly
#endif /* FOLLY_IO_ASYNCIO_H_ */
-