Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 23465 invoked from network); 4 Jul 2009 15:30:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jul 2009 15:30:01 -0000 Received: (qmail 16626 invoked by uid 500); 4 Jul 2009 15:30:11 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 16591 invoked by uid 500); 4 Jul 2009 15:30:10 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 16581 invoked by uid 99); 4 Jul 2009 15:30:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jul 2009 15:30:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists+1231964187411-2158936@n2.nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jul 2009 15:29:59 +0000 Received: from tervel.nabble.com ([192.168.236.150]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MN7BK-0007Hm-RM for users@qpid.apache.org; Sat, 04 Jul 2009 08:29:38 -0700 Date: Sat, 4 Jul 2009 08:29:38 -0700 (PDT) From: RickW To: users@qpid.apache.org Message-ID: <1246721378843-3205915.post@n2.nabble.com> In-Reply-To: <1239894164856-2642900.post@n2.nabble.com> References: <1239729327705-2634272.post@n2.nabble.com> <17e364b30904141026v3986f66bv23cf7d7542029fdf@mail.gmail.com> <1239741687927-2635248.post@n2.nabble.com> <1239746027.21477.3.camel@rolf> <1239894164856-2642900.post@n2.nabble.com> Subject: Re: Interupting SubscriptionManager::run() MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: rick.way@in-deptheng.com X-Virus-Checked: Checked by ClamAV on apache.org Follow up to the thread: We now use QPID two ways. (1) Message-driven programs willing to relinquish control permanently to QPID call SubscriptionManager::run(). (2) Programs that are not totally message-driven (those needing non-message events like timers or operator input) use LocalQueues. Their main loop checks for other events and then check the LocalQueues for messages. We have been unable to make the non-message-driven programs efficient. The main loop burns 100% CPU unless we add sleeps, which means we are doing nothing when there could be messages to process. We really need something like a SubscriptionManager::runTimed(interval) call. It would process messages (or block if none is available) for the specified interval and then return. Is there some way to do this? Rick -- View this message in context: http://n2.nabble.com/Interupting-SubscriptionManager%3A%3Arun%28%29-tp2634272p3205915.html Sent from the Apache Qpid users mailing list archive at Nabble.com. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org