diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-21 13:21:07 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-21 16:54:02 -0800 |
commit | 247ce76b4aabfa42157b9cbf9ebae824819cfff6 (patch) | |
tree | b3c61036f7befb1d9cb697193dc8a629ac362fe7 /lib/rainbows/epoll/state.rb | |
parent | b33ab73a984660ab2d741b32725ab21d7860bef3 (diff) | |
download | rainbows-247ce76b4aabfa42157b9cbf9ebae824819cfff6.tar.gz |
We can eliminate the State module to simplify our code since 1.3.x keeps better track of things.
Diffstat (limited to 'lib/rainbows/epoll/state.rb')
-rw-r--r-- | lib/rainbows/epoll/state.rb | 22 |
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 |