From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 113B217C1F2B for ; Fri, 29 Apr 2011 07:00:12 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id DFB35EA650A for ; Fri, 29 Apr 2011 07:02:30 +0900 (JST) Received: from localhost (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 080972B1930 for ; Fri, 29 Apr 2011 07:02:31 +0900 (JST) X-Virus-Scanned: amavisd-new at funfun.nagaokaut.ac.jp Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by localhost (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3BV-YfZVl92G for ; Fri, 29 Apr 2011 07:02:30 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id DB8BB2B177C for ; Fri, 29 Apr 2011 07:02:30 +0900 (JST) Received: from carbon.ruby-lang.org (carbon.ruby-lang.org [221.186.184.68]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id E381A95241F for ; Fri, 29 Apr 2011 07:02:29 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) by carbon.ruby-lang.org (Postfix) with ESMTP id 27AA23C21F75C; Fri, 29 Apr 2011 06:53:06 +0900 (JST) Received: from fluorine.ruby-lang.org (www.rubyist.net [210.251.121.216]) by carbon.ruby-lang.org (Postfix) with ESMTP id 616E83C21F74C for ; Fri, 29 Apr 2011 06:50:36 +0900 (JST) Received: from ruby-lang.org (localhost [127.0.0.1]) by fluorine.ruby-lang.org (Postfix) with ESMTP id 435CA3ED3E for ; Fri, 29 Apr 2011 06:50:36 +0900 (JST) Delivered-To: ruby-core@ruby-lang.org Date: Fri, 29 Apr 2011 06:52:25 +0900 Posted: Fri, 29 Apr 2011 06:50:36 +0900 From: Eric Hodel Reply-To: ruby-core@ruby-lang.org Subject: [ruby-core:35941] [Ruby 1.9 - Feature #4589] add Queue#each() method and include Enumerable To: ruby-core@ruby-lang.org Message-Id: References: X-ML-Name: ruby-core X-Mail-Count: 35941 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-core-ctl@ruby-lang.org; help= X-Mailer: Redmine X-Spam-Checker-Version: SpamAssassin 3.1.7-deb3 (2006-10-05) on carbon.ruby-lang.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=7.0 tests=BAYES_50,CONTENT_TYPE_PRESENT, FORGED_RCVD_HELO,RCVD_IN_CHINA,RCVD_IN_CHINA_KR,RCVD_IN_TAIWAN, X_MAILER_PRESENT autolearn=disabled version=3.1.7-deb3 X-Redmine-Issue-Author: sunaku X-Redmine-Issue-Id: 4589 X-Redmine-Mailinglistintegration-Message-Ids: 4829 X-Redmine-Project: ruby-19 Auto-Submitted: auto-generated X-Redmine-Site: Ruby Issue Tracking System X-Redmine-Host: redmine.ruby-lang.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Precedence: bulk List-Id: ruby-core.ruby-lang.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: Issue #4589 has been updated by Eric Hodel. I don't think it is appropriate to include Enumerable. Too many methods from Enumerable seem inappropriate (or behavior would be application-specific). For example, should #find block, or only return items that match in the Queue? Should #reject remove items from the Queue, or only filter? I can see differing needs depending on if the Queue has a single consumer or multiple consumers. ---------------------------------------- Feature #4589: add Queue#each() method and include Enumerable http://redmine.ruby-lang.org/issues/4589 Author: Suraj Kurapati Status: Open Priority: Normal Assignee: Category: lib Target version: Please add a thread-safe each() method to the Queue and SizedQueue classes which are provided by the "thread" standard library Also mix-in the Enumerable module into those classes so we can use map/inject/etc. Thanks for your consideration. -- http://redmine.ruby-lang.org