Commit 1ec49a66 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Use function ptr instead of std::function

Summary:
Use function ptr instead of std::function

(Note: this ignores all push blocking failures!)

Reviewed By: yfeldblum, kevin-vigor

Differential Revision: D19277936

fbshipit-source-id: 59c2c79ed07690ffe69461e6a90dbf8b297e51fa
parent f8995818
...@@ -54,14 +54,14 @@ class PollIoBackend : public EventBaseBackendBase { ...@@ -54,14 +54,14 @@ class PollIoBackend : public EventBaseBackendBase {
struct IoCb struct IoCb
: public boost::intrusive::list_base_hook< : public boost::intrusive::list_base_hook<
boost::intrusive::link_mode<boost::intrusive::auto_unlink>> { boost::intrusive::link_mode<boost::intrusive::auto_unlink>> {
using BackendCb = std::function<void(PollIoBackend*, IoCb*, int64_t)>; using BackendCb = void(PollIoBackend*, IoCb*, int64_t);
explicit IoCb(PollIoBackend* backend, bool poolAlloc = true) explicit IoCb(PollIoBackend* backend, bool poolAlloc = true)
: backend_(backend), poolAlloc_(poolAlloc) {} : backend_(backend), poolAlloc_(poolAlloc) {}
virtual ~IoCb() = default; virtual ~IoCb() = default;
PollIoBackend* backend_; PollIoBackend* backend_;
BackendCb backendCb_; BackendCb* backendCb_{nullptr};
const bool poolAlloc_; const bool poolAlloc_;
IoCb* next_{nullptr}; // this is for the free list IoCb* next_{nullptr}; // this is for the free list
Event* event_{nullptr}; Event* event_{nullptr};
......
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