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.5 required=3.0 tests=AWL,FROM_LOCAL_NOVOWEL, MIME_QP_LONG_LINE,MSGID_FROM_MTA_HEADER,TVD_RCVD_IP shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Damian Janowski Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: Out of band stuff? Date: Mon, 9 Apr 2012 10:04:26 -0300 Message-ID: References: <20120409030552.GA24089@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1333977232 9718 80.91.229.3 (9 Apr 2012 13:13:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2012 13:13:52 +0000 (UTC) Cc: Rainbows! list To: Eric Wong Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Mon Apr 09 15:13:52 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SUub5LBtP8L4iK8B7cXBu5Jwjp4bNiQwEuyQGrL6HeI=; b=bQ3xwiRD4M7zHGxU5niUsy+ZKQhrwVtAZ3CcM0MwJUu9Is7QLusMqjuksXMp9doN2f O209NLwGQ67svX53/Hjqo+G/lG2NZd4t7+yXNdnC+RsMi/CHPkz4kJSiBeSVLs90kby2 Y9+A3fIbZ5kSptIBqfXVdCTh3mPE0nnysVpXJF+vJ1lmKPKkgE/fTiJvozJgH3MDbHe8 cYOQd74eYlBZB6UE/tv2rg41eZVV7dtNMmMZLTC6iMxkEONS5UefFTo/fTGQvCNJcKqs oR2RZEH5ep0zPIFzivL88iAyqLGmFPNzLS/9W3v3oFW2Gu/LyJL3XXa2ctEswnziWmj3 lhUQ== In-Reply-To: <20120409030552.GA24089-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Google-Sender-Auth: q4qiTmnWvsX251yb0VovCdcGAYQ 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:338 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 1SHEPn-0003Wo-NZ for gclrrg-rainbows-talk@m.gmane.org; Mon, 09 Apr 2012 15:13:51 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 810D426304D; Mon, 9 Apr 2012 13:13:49 +0000 (UTC) Received: from mail-lpp01m010-f50.google.com (mail-lpp01m010-f50.google.com [209.85.215.50]) by rubyforge.org (Postfix) with ESMTP id 3116926303E for ; Mon, 9 Apr 2012 13:04:26 +0000 (UTC) Received: by lahm13 with SMTP id m13so4182104lah.23 for ; Mon, 09 Apr 2012 06:04:26 -0700 (PDT) Received: by 10.152.104.194 with SMTP id gg2mr1169581lab.2.1333976666217; Mon, 09 Apr 2012 06:04:26 -0700 (PDT) Received: by 10.112.81.226 with HTTP; Mon, 9 Apr 2012 06:04:26 -0700 (PDT) On Mon, Apr 9, 2012 at 12:05 AM, Eric Wong wrote: > For Raindrops::Watcher, I start a background thread on the first request: > > =A0 =A0 =A0 =A0git clone git://bogomips.org/raindrops.git > =A0 =A0 =A0 =A0$EDITOR lib/raindrops/watcher.rb Great, that should get me started! > If you look at the `call' method in raindrops/watcher.rb, the important > line is this: > > =A0 =A0 =A0 =A0# @start is a Mutex and @thr is nil in the initialize meth= od. > > =A0 =A0 =A0 =A0-d7HPF+t6YlILr15SpQP/1rNAH6kLmebB@public.gmane.org { @thr ||=3D aggregator_thread(env["rac= k.logger"]) } By the way, why does #aggregator_thread call #wait_snapshot before returning the thread? (I'm no expert in threading, but my guess is to wait for the first loop to run correctly?) _______________________________________________ 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