From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=0.0 required=3.0 tests=MSGID_FROM_MTA_HEADER, TVD_RCVD_IP shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Alexandre Riveira Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: background threads Date: Mon, 18 Jun 2012 19:26:57 +0000 Message-ID: <4FDF8101.9020500@objectdata.com.br> References: <4FDF7420.7030300@objectdata.com.br> <20120618215550.GA31162@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1340058420 11032 80.91.229.3 (18 Jun 2012 22:27:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2012 22:27:00 +0000 (UTC) Cc: Rainbows! list To: Eric Wong Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Jun 19 00:26:57 2012 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=3u10bn6duCHfxyGXUrHnosELrxifx5LIRmgcBs9NP0c=; b=fgPsJ9KWGKb7PmlMm0iwr8i9sJSt43uIZHeo/EjaIz95g/o+Uj4e2Hrtq0XFW9xkaW lec+mvKUo6KSCtAx1Sr2uO6aVo49nDohEbpFIOQIsfEkkw9pIe8npbLp+PJSbgrI/b79 zmH9NnxlhH6L/Q/DkCkwpIA0MIWuxpKFZUJu1kG0z8cPewf7N3BWv+LTicC0YLf7+23v mLThYFVa4Ystui287NT17vc87PKwcSwO2Fn8VGvXYF+O876JHdpNtNKG3RVsPsDAsdo2 09r/sBHACir/E4tn9rxoj9wDLIKJ1AOuW49FfWyYSSwNcymmVZapZBBkFawFWYydiXe+ 0R3A== User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.4) Gecko/20120421 Thunderbird/10.0.4 In-Reply-To: <20120618215550.GA31162-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Gm-Message-State: ALoCoQlPOT82mH64SchG0r4Ah8cJe0/8d/O1tv/57mJV3xIdbYlHGKCq3t1AiiWk2jjFTrX2dW3E X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:363 Archived-At: Received: from 50-56-192-79.static.cloud-ips.com ([50.56.192.79] helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SgkPQ-00036i-D6 for gclrrg-rainbows-talk@m.gmane.org; Tue, 19 Jun 2012 00:26:56 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 2CE832E072; Mon, 18 Jun 2012 22:26:56 +0000 (UTC) Received: from mail-gh0-f178.google.com (mail-gh0-f178.google.com [209.85.160.178]) by rubyforge.org (Postfix) with ESMTP id D25C72E06D for ; Mon, 18 Jun 2012 22:26:47 +0000 (UTC) Received: by ghbf1 with SMTP id f1so4918532ghb.23 for ; Mon, 18 Jun 2012 15:26:47 -0700 (PDT) Received: by 10.236.76.230 with SMTP id b66mr20208954yhe.93.1340058407214; Mon, 18 Jun 2012 15:26:47 -0700 (PDT) Received: from [192.168.0.125] ([189.78.153.40]) by mx.google.com with ESMTPS id l13sm32055124ann.2.2012.06.18.15.26.42 (version=SSLv3 cipher=OTHER); Mon, 18 Jun 2012 15:26:46 -0700 (PDT) Em 18-06-2012 21:55, Eric Wong escreveu: > So for background threads, I prefer to start it in the app stack > on the first request (use a mutex to protect against double-starts). > For rails, you can probably do it in a before_filter. Eric, como voc=EA garante a aplica=E7=E3o n=E3o criar uma thread em cada wo= rker Tanks Alexandre Riveira brazil _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying