diff options
author | Eric Wong <e@80x24.org> | 2013-10-30 01:50:17 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-10-30 07:01:01 +0000 |
commit | 61f325506c699292bf6ec7982ab824bc375ca03f (patch) | |
tree | 2a3412f24e538966bcc07a3eb649de93591baeb6 /lib/yahns/queue_epoll.rb | |
parent | 666d1936c72ae73b9f02d73000015135cdc4a716 (diff) | |
download | yahns-61f325506c699292bf6ec7982ab824bc375ca03f.tar.gz |
This saves about 200 bytes of unswappable kernel memory, so it might matter for systems with many connections when hijacking.
Diffstat (limited to 'lib/yahns/queue_epoll.rb')
-rw-r--r-- | lib/yahns/queue_epoll.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/yahns/queue_epoll.rb b/lib/yahns/queue_epoll.rb index c22a624..3d2e33f 100644 --- a/lib/yahns/queue_epoll.rb +++ b/lib/yahns/queue_epoll.rb @@ -27,6 +27,10 @@ class Yahns::Queue < SleepyPenguin::Epoll::IO # :nodoc: Thread.current[:yahns_fdmap] = @fdmap end + def queue_del(io) + epoll_ctl(Epoll::CTL_DEL, io, 0) + end + # returns an array of infinitely running threads def worker_thread(logger, max_events) Thread.new do |