Commit 9b6c06fa authored by Christian Watson's avatar Christian Watson Committed by Facebook GitHub Bot

Revert D26612326: A new NotificationQueue without read limit for server responses

Differential Revision:
D26612326 (https://github.com/facebook/folly/commit/28799ed1d609bb1aca82464be8ad9dbf4e9f1b39)

Original commit changeset: d56c892c87ba

fbshipit-source-id: 77f8a7c58bfced197558ed29912ace457a089baa
parent e741d8ef
...@@ -151,6 +151,14 @@ class ExecutionObserverScopeGuard { ...@@ -151,6 +151,14 @@ class ExecutionObserverScopeGuard {
namespace folly { namespace folly {
class EventBase::FuncRunner {
public:
void operator()(Func&& func) noexcept {
func();
func = nullptr;
}
};
/* /*
* EventBase methods * EventBase methods
*/ */
......
...@@ -143,16 +143,6 @@ class EventBase : public TimeoutManager, ...@@ -143,16 +143,6 @@ class EventBase : public TimeoutManager,
using Func = folly::Function<void()>; using Func = folly::Function<void()>;
class FuncRunner {
public:
void operator()(Func&& func) noexcept {
func();
func = nullptr;
}
};
using EventBaseQueue = EventBaseAtomicNotificationQueue<Func, FuncRunner>;
/** /**
* A callback interface to use with runInLoop() * A callback interface to use with runInLoop()
* *
...@@ -865,6 +855,8 @@ class EventBase : public TimeoutManager, ...@@ -865,6 +855,8 @@ class EventBase : public TimeoutManager,
} }
private: private:
class FuncRunner;
folly::VirtualEventBase* tryGetVirtualEventBase(); folly::VirtualEventBase* tryGetVirtualEventBase();
void applyLoopKeepAlive(); void applyLoopKeepAlive();
...@@ -914,7 +906,7 @@ class EventBase : public TimeoutManager, ...@@ -914,7 +906,7 @@ class EventBase : public TimeoutManager,
// A notification queue for runInEventBaseThread() to use // A notification queue for runInEventBaseThread() to use
// to send function requests to the EventBase thread. // to send function requests to the EventBase thread.
std::unique_ptr<EventBaseQueue> queue_; std::unique_ptr<EventBaseAtomicNotificationQueue<Func, FuncRunner>> queue_;
ssize_t loopKeepAliveCount_{0}; ssize_t loopKeepAliveCount_{0};
std::atomic<ssize_t> loopKeepAliveCountAtomic_{0}; std::atomic<ssize_t> loopKeepAliveCountAtomic_{0};
bool loopKeepAliveActive_{false}; bool loopKeepAliveActive_{false};
......
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