diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-07-19 13:10:37 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-07-19 13:13:10 -0700 |
commit | 5bcbe397f4457fa6c76443cc77d662139ef464f2 (patch) | |
tree | 38faf3c16e89a606bcf2d329573ff06e118d31f9 /lib | |
parent | 73a76531b7f4826cdb3bad0a0286038fb6ade4f3 (diff) | |
download | rainbows-5bcbe397f4457fa6c76443cc77d662139ef464f2.tar.gz |
Again, for the one thousandth time, timing out threads is very tricky business :<
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rainbows/thread_timeout.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ require 'thread' # 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: |