Mercurial > prosody-hg
comparison net/server_epoll.lua @ 7630:abe2697b5e92
net.server_epoll: Remove commented out code
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 23 Aug 2016 20:31:14 +0200 |
| parents | 0fcde9869cc1 |
| children | cccea9136b2d |
comparison
equal
deleted
inserted
replaced
| 7629:0fcde9869cc1 | 7630:abe2697b5e92 |
|---|---|
| 73 if resort_timers then | 73 if resort_timers then |
| 74 -- Sort earliest timers to the end | 74 -- Sort earliest timers to the end |
| 75 t_sort(timers, function (a, b) return a[1] > b[1]; end); | 75 t_sort(timers, function (a, b) return a[1] > b[1]; end); |
| 76 resort_timers = false; | 76 resort_timers = false; |
| 77 end | 77 end |
| 78 | |
| 79 --[[ Is it worth it to skip the noop calls? | |
| 80 for i = #timers, 1, -1 do | |
| 81 if timers[i][2] == noop then | |
| 82 timers[i] = nil; | |
| 83 else | |
| 84 break; | |
| 85 end | |
| 86 end | |
| 87 --]] | |
| 88 | 78 |
| 89 -- Iterate from the end and remove completed timers | 79 -- Iterate from the end and remove completed timers |
| 90 for i = #timers, 1, -1 do | 80 for i = #timers, 1, -1 do |
| 91 local timer = timers[i]; | 81 local timer = timers[i]; |
| 92 local t, f = timer[1], timer[2]; | 82 local t, f = timer[1], timer[2]; |
