From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Subject: [PATCH] thread_timeout: document additional caveats
Date: Thu, 19 Jul 2012 13:14:03 -0700 [thread overview]
Message-ID: <20120719201403.GA11657@dcvr.yhbt.net> (raw)
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
next reply other threads:[~2012-07-19 20:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 20:14 Eric Wong [this message]
[not found] ` <20120719201403.GA11657-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-07-20 2:40 ` [PATCH] thread_timeout: document additional caveats Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/rainbows/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120719201403.GA11657@dcvr.yhbt.net \
--to=normalperson-rmlxzr9ms24@public.gmane.org \
--cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/rainbows.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).