allow AsyncSignalHandler to attach and detach from an EventBase
authorAdam Simpkins <simpkins@fb.com>
Tue, 27 Jun 2017 02:27:32 +0000 (19:27 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 27 Jun 2017 02:35:06 +0000 (19:35 -0700)
commitdc1c3dcc04baa70029d16351d4424af4a7ef4385
tree3d725fc4fac41753f83201b489692b525c5ed3c9
parent46c5dbce6c04234ae0185d3fadb62556c7e7625b
allow AsyncSignalHandler to attach and detach from an EventBase

Summary:
Add attachEventBase() and detachEventBase() methods to AsyncSignalHandler,
similar to the methods of AsyncSocket.

The main benefit of this is that it allows creating an AsyncSignalHandler with
an initially null EventBase, and then attaching it to an EventBase at some
later point in time.

Reviewed By: yfeldblum

Differential Revision: D5315325

fbshipit-source-id: 8a4ca483a62ca86837ea0bb54fa9a70d59f2f04e
CMakeLists.txt
folly/io/async/AsyncSignalHandler.cpp
folly/io/async/AsyncSignalHandler.h
folly/io/async/test/AsyncSignalHandlerTest.cpp [new file with mode: 0644]