about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-04-21 05:24:43 +0000
committerEric Wong <e@80x24.org>2014-04-21 05:24:43 +0000
commit8e8cf4ffe55da0618cdfa341ac88153e8625b3f1 (patch)
tree1b4704ebda758ba3b0bf3513bfd96d22bd3c758f
parentf161f410853ab1a8e8ebad7bf19754d3771d9412 (diff)
downloadyahns-8e8cf4ffe55da0618cdfa341ac88153e8625b3f1.tar.gz
Much of this code was copied from the epoll queue.
-rw-r--r--lib/yahns/queue_kqueue.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/yahns/queue_kqueue.rb b/lib/yahns/queue_kqueue.rb
index c502de0..ce75793 100644
--- a/lib/yahns/queue_kqueue.rb
+++ b/lib/yahns/queue_kqueue.rb
@@ -26,7 +26,7 @@ class Yahns::Queue < SleepyPenguin::Kqueue::IO # :nodoc:
   # flags: QEV_RD/QEV_WR (usually QEV_RD)
   def queue_add(io, flags)
     # order is very important here, this thread cannot do anything with
-    # io once we've issued epoll_ctl() because another thread may use it
+    # io once we've issued kevent EV_ADD because another thread may use it
     @fdmap.add(io)
     fflags = ADD_ONESHOT
     if flags == QEV_QUIT
@@ -54,8 +54,8 @@ class Yahns::Queue < SleepyPenguin::Kqueue::IO # :nodoc:
       begin
         kevent(nil, max_events) do |_,_,_,_,_,io| # don't care for flags for now
           # Note: we absolutely must not do anything with io after
-          # we've called epoll_ctl on it, io is exclusive to this
-          # thread only until epoll_ctl is called on it.
+          # we've called kevent(...,EV_ADD) on it, io is exclusive to this
+          # thread only until kevent(...,EV_ADD) is called on it.
           case rv = io.yahns_step
           when :wait_readable
             kevent(Kevent[io.fileno, QEV_RD, ADD_ONESHOT, 0, 0, io])