diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 15:36:27 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 17:33:22 +0900 |
| commit | 596e5c616218c9681adf4eb45077608510e2876e (patch) | |
| tree | be2c7fb20b14f0c4dc533c82dbb5dad23529d693 /src/LibuvEventPoll.cc | |
| parent | f55c16c7edeb319a82217a91a87a35cddfd606b0 (diff) | |
Refactor event poll classes so that we don't have to allocate memory on query
I left Port and libuv classes, since I don't have them compiled.
So they were updated minimally.
Diffstat (limited to 'src/LibuvEventPoll.cc')
| -rw-r--r-- | src/LibuvEventPoll.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LibuvEventPoll.cc b/src/LibuvEventPoll.cc index 09d314b6..3fc76fda 100644 --- a/src/LibuvEventPoll.cc +++ b/src/LibuvEventPoll.cc @@ -233,7 +233,7 @@ bool LibuvEventPoll::addEvents(sock_t socket, auto i = socketEntries_.lower_bound(socketEntry); if (i != socketEntries_.end() && **i == *socketEntry) { - event.addSelf(*i); + event.addSelf((*i).get()); auto poll = polls_.find(socket); if (poll == polls_.end()) { throw std::logic_error("Invalid socket"); @@ -243,7 +243,7 @@ bool LibuvEventPoll::addEvents(sock_t socket, } socketEntries_.insert(i, socketEntry); - event.addSelf(socketEntry); + event.addSelf(socketEntry.get()); auto poll = new KPoll(this, socketEntry.get(), socket); polls_[socket] = poll; poll->start(); @@ -275,7 +275,7 @@ bool LibuvEventPoll::deleteEvents(sock_t socket, return false; } - event.removeSelf(*i); + event.removeSelf((*i).get()); auto poll = polls_.find(socket); if (poll == polls_.end()) { |
