proxygen
wangle::AsyncServerSocketFactory::ThreadSafeDestructor Class Reference

#include <ServerSocketFactory.h>

Public Member Functions

void operator() (folly::AsyncServerSocket *socket) const
 

Detailed Description

Definition at line 83 of file ServerSocketFactory.h.

Member Function Documentation

void wangle::AsyncServerSocketFactory::ThreadSafeDestructor::operator() ( folly::AsyncServerSocket socket) const
inline

Definition at line 85 of file ServerSocketFactory.h.

References folly::AsyncServerSocket::destroy(), folly::AsyncServerSocket::getEventBase(), and folly::EventBase::runImmediatelyOrRunInEventBaseThreadAndWait().

85  {
86  folly::EventBase* evb = socket->getEventBase();
87  if (evb) {
89  socket->destroy();
90  });
91  } else {
92  socket->destroy();
93  }
94  }
EventBase * getEventBase() const override
bool runImmediatelyOrRunInEventBaseThreadAndWait(void(*fn)(T *), T *arg)
Definition: EventBase.h:804

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