From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: normalperson@yhbt.net Received: from zedshaw.xen.prgmr.com (zedshaw.xen.prgmr.com [64.71.167.205]) by dcvr.yhbt.net (Postfix) with ESMTP id 2108E1F701 for ; Thu, 24 Jan 2013 00:47:33 +0000 (UTC) Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 5D03621FCB7 for ; Thu, 24 Jan 2013 01:00:50 +0000 (UTC) MIME-Version: 1.0 Date: Thu, 24 Jan 2013 00:47:15 +0000 From: Eric Wong List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Message-Id: <1358988435-16017-2-git-send-email-normalperson@yhbt.net> Precedence: list References: <1358988435-16017-1-git-send-email-normalperson@yhbt.net> Sender: sleepy.penguin@librelist.org Subject: [sleepy.penguin] [PATCH 2/2] epoll: update documentation for multi-threaded use To: sleepy.penguin@librelist.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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