about summary refs log tree commit homepage
path: root/lib/rainbows/epoll/state.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/epoll/state.rb')
-rw-r--r--lib/rainbows/epoll/state.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/rainbows/epoll/state.rb b/lib/rainbows/epoll/state.rb
deleted file mode 100644
index 6e554be..0000000
--- a/lib/rainbows/epoll/state.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- encoding: binary -*-
-# :enddoc:
-# used to keep track of state for each descriptor and avoid
-# unneeded syscall or ENONENT overhead
-module Rainbows::Epoll::State
-  EP = SleepyPenguin::Epoll.new
-
-  def epoll_disable
-    @epoll_active or return
-    @epoll_active = false
-    EP.del(self)
-  end
-
-  def epoll_enable(flags)
-    if @epoll_active
-      flags == @epoll_active or
-        EP.mod(self, @epoll_active = flags)
-    else
-      EP.add(self, @epoll_active = flags)
-    end
-  end
-end