proxygen
folly::EventUtil Class Reference

#include <EventUtil.h>

Static Public Member Functions

static bool isEventRegistered (const struct event *ev)
 

Detailed Description

low-level libevent utility functions

Definition at line 49 of file EventUtil.h.

Member Function Documentation

static bool folly::EventUtil::isEventRegistered ( const struct event *  ev)
inlinestatic

Definition at line 51 of file EventUtil.h.

References folly::event_ref_flags().

Referenced by folly::EventBase::cancelTimeout(), folly::EventHandler::isHandlerRegistered(), and folly::AsyncTimeout::isScheduled().

51  {
52  // If any of these flags are set, the event is registered.
53  enum {
54  EVLIST_REGISTERED =
55  (EVLIST_INSERTED | EVLIST_ACTIVE | EVLIST_TIMEOUT | EVLIST_SIGNAL)
56  };
57  return (event_ref_flags(ev) & EVLIST_REGISTERED);
58  }
auto event_ref_flags(struct event *ev) -> decltype(std::ref(ev->ev_flags))
Definition: EventUtil.h:41

The documentation for this class was generated from the following file: