Comparison

net/server_epoll.lua @ 10088:97da8452c6a6

net.server_epoll: Deprecate libevent emulation layer
author Kim Alvefur <zash@zash.se>
date Wed, 24 Jul 2019 16:50:06 +0200
parent 10082:1df53ef1f60d
child 10089:90e459f48cbd
comparison
equal deleted inserted replaced
10087:36d3709603d1 10088:97da8452c6a6
811 end; 811 end;
812 812
813 -- libevent emulation 813 -- libevent emulation
814 event = { EV_READ = "r", EV_WRITE = "w", EV_READWRITE = "rw", EV_LEAVE = -1 }; 814 event = { EV_READ = "r", EV_WRITE = "w", EV_READWRITE = "rw", EV_LEAVE = -1 };
815 addevent = function (fd, mode, callback) 815 addevent = function (fd, mode, callback)
816 log("warn", "Using deprecated libevent emulation, please update code to use watchfd API instead");
816 local function onevent(self) 817 local function onevent(self)
817 local ret = self:callback(); 818 local ret = self:callback();
818 if ret == -1 then 819 if ret == -1 then
819 self:set(false, false); 820 self:set(false, false);
820 elseif ret then 821 elseif ret then