Commit e3d118ed authored by Praveen Kumar's avatar Praveen Kumar Committed by Andre Azevedo

BackoffTimeout disallow copy, move, default ctor

Summary:
BackoffTimeout disallow copy construction, copy assignment, move
construction, move assignment, and default construction.

Closes https://github.com/facebook/folly/pull/146

Test Plan: runtests

Reviewed By: ldbrandy@fb.com

Subscribers: lins, anca, folly-diffs@, yfeldblum

FB internal diff: D1912521

Signature: t1:1912521:1426268413:6edb2d8203d1efd1e825816f03be115ac46e55ca
parent 4cc84128
...@@ -116,9 +116,10 @@ void AsyncServerSocket::RemoteAcceptor::messageAvailable( ...@@ -116,9 +116,10 @@ void AsyncServerSocket::RemoteAcceptor::messageAvailable(
*/ */
class AsyncServerSocket::BackoffTimeout : public AsyncTimeout { class AsyncServerSocket::BackoffTimeout : public AsyncTimeout {
public: public:
// Disallow copy, move, and default constructors.
BackoffTimeout(BackoffTimeout&&) = delete;
BackoffTimeout(AsyncServerSocket* socket) BackoffTimeout(AsyncServerSocket* socket)
: AsyncTimeout(socket->getEventBase()), : AsyncTimeout(socket->getEventBase()), socket_(socket) {}
socket_(socket) {}
virtual void timeoutExpired() noexcept { virtual void timeoutExpired() noexcept {
socket_->backoffTimeoutExpired(); socket_->backoffTimeoutExpired();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment