sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: sleepy.penguin@librelist.org
Subject: [sleepy.penguin] [PATCH 2/2] epoll: update documentation for multi-threaded use
Date: Thu, 24 Jan 2013 00:47:15 +0000	[thread overview]
Message-ID: <1358988435-16017-2-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: 1358988435-16017-1-git-send-email-normalperson@yhbt.net

We forgot to update this documentation when we released 3.1.0
---
 ext/sleepy_penguin/epoll.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/ext/sleepy_penguin/epoll.c b/ext/sleepy_penguin/epoll.c
index 7297f70..3dcd357 100644
--- a/ext/sleepy_penguin/epoll.c
+++ b/ext/sleepy_penguin/epoll.c
@@ -400,8 +400,10 @@ static VALUE real_epwait(struct ep_per_thread *ept)
  *
  * Calls epoll_wait(2) and yields Integer +flags+ and IO objects watched
  * for.  +maxevents+ is the maximum number of events to process at once,
- * lower numbers may prevent starvation when used by dup-ed Epoll objects
- * in multiple threads. +timeout+ is specified in milliseconds, +nil+
+ * lower numbers may prevent starvation when used by Epoll#wait in multiple
+ * threads.  Larger +maxevents+ reduces syscall overhead for
+ * single-threaded applications. +maxevents+ defaults to 64 events.
+ * +timeout+ is specified in milliseconds, +nil+
  * (the default) meaning it will block and wait indefinitely.
  */
 static VALUE epwait(int argc, VALUE *argv, VALUE self)
@@ -547,9 +549,8 @@ static int cloexec_dup(struct rb_epoll *ep)
  *	epoll.dup	-> another Epoll object
  *
  * Duplicates an Epoll object and userspace buffers related to this library.
- * This allows the same epoll object in the Linux kernel to be safely used
- * across multiple native threads as long as there is one SleepyPenguin::Epoll
- * object per-thread.
+ * Since SleepyPenguin 3.1.0, this is no longer needed for multi-threaded
+ * Epoll#wait.
  */
 static VALUE init_copy(VALUE copy, VALUE orig)
 {
-- 
1.8.1.46.gcb3a6ab



      reply	other threads:[~2013-01-24  0:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24  0:47 [sleepy.penguin] [PATCH 1/2] epoll: use pthread_once properly Eric Wong
2013-01-24  0:47 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/sleepy_penguin/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358988435-16017-2-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=sleepy.penguin@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/sleepy_penguin.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).