about summary refs log tree commit homepage
path: root/lib/yahns/queue_epoll.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-30 01:50:17 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-30 07:01:01 +0000
commit61f325506c699292bf6ec7982ab824bc375ca03f (patch)
tree2a3412f24e538966bcc07a3eb649de93591baeb6 /lib/yahns/queue_epoll.rb
parent666d1936c72ae73b9f02d73000015135cdc4a716 (diff)
downloadyahns-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.rb4
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