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=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER,TVD_RCVD_IP shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: [PATCH] thread_timeout: document additional caveats Date: Thu, 19 Jul 2012 13:14:03 -0700 Message-ID: <20120719201403.GA11657@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342728862 22342 80.91.229.3 (19 Jul 2012 20:14:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2012 20:14:22 +0000 (UTC) To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Thu Jul 19 22:14:22 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 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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:376 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 1Srx6z-0000cO-UZ for gclrrg-rainbows-talk@m.gmane.org; Thu, 19 Jul 2012 22:14:14 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 958992E06D; Thu, 19 Jul 2012 20:14:11 +0000 (UTC) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 90D4F2E067 for ; Thu, 19 Jul 2012 20:14:04 +0000 (UTC) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 755AC1F449; Thu, 19 Jul 2012 20:14:03 +0000 (UTC) Again, for the one thousandth time, timing out threads is very tricky business :< --- Pushed to "master" of git://bogomips.org/rainbows and updated http://rainbows.rubyforge.org/Rainbows/ThreadTimeout.html lib/rainbows/thread_timeout.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/rainbows/thread_timeout.rb b/lib/rainbows/thread_timeout.rb index 4f62aba..8348272 100644 --- a/lib/rainbows/thread_timeout.rb +++ b/lib/rainbows/thread_timeout.rb @@ -44,6 +44,15 @@ # does not expose a monotonic clock for users, so don't change # the system time while this is running. All servers should be # running ntpd anyways. +# +# "ensure" clauses may not fire properly or be interrupted during +# execution, so do not mix this module with code which relies on "ensure". +# (This is also true for the "Timeout" module in the Ruby standard library) +# +# "recursive locking" ThreadError exceptions may occur if +# ThreadTimeout fires while a Mutex is locked (because "ensure" +# clauses may not fire properly). + class Rainbows::ThreadTimeout # :stopdoc: -- Eric Wong _______________________________________________ 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