Make EventHandler::isPending const
authorAlex Landau <alandau@fb.com>
Thu, 15 May 2014 20:23:23 +0000 (13:23 -0700)
committerDave Watson <davejwatson@fb.com>
Tue, 20 May 2014 19:53:59 +0000 (12:53 -0700)
Summary: Because it just queries state

Test Plan: fbmake

Reviewed By: haijunz@fb.com

Subscribers: folly@lists

FB internal diff: D1332397

folly/io/async/EventHandler.cpp
folly/io/async/EventHandler.h

index 4c9d9701e9a5c0d14da26d14e5415a35763bb3f7..6d410de62555f88716a97d64a6a4d545b02ffd3e 100644 (file)
@@ -156,7 +156,7 @@ void EventHandler::setEventBase(EventBase* eventBase) {
   eventBase_ = eventBase;
 }
 
-bool EventHandler::isPending() {
+bool EventHandler::isPending() const {
   if (event_.ev_flags & EVLIST_ACTIVE) {
     if (event_.ev_res & EV_READ) {
       return true;
index 3239c6142b3041fd995b2439f37e49eabf32da9a..520a24c710acea6ef82624ff873f02190a9901e3 100644 (file)
@@ -167,7 +167,7 @@ class EventHandler : private boost::noncopyable {
     return registerImpl(events, true);
   }
 
-  bool isPending();
+  bool isPending() const;
 
  private:
   bool registerImpl(uint16_t events, bool internal);