thread_timeout: rewrite for safety
commit321e3dfbd5c4a585c00a8d5221ebdf9b934aaea1
authorEric Wong <normalperson@yhbt.net>
Mon, 11 Apr 2011 04:16:31 +0000 (11 04:16 +0000)
committerEric Wong <normalperson@yhbt.net>
Mon, 11 Apr 2011 04:16:31 +0000 (11 04:16 +0000)
tree717b87663b9d210ba04b91318d759b2bd8af142e
parent5170b767ef1bbc94554920959d1792fce43899a9
thread_timeout: rewrite for safety

This attempts to fix all the danger associated with using
Thread#raise.  Hopefully I succeeded.

Note: this logic _cannot_ be used to fix the timeout.rb
module in the Ruby standard library, that one needs to
allow nested timeouts (which seems impossible).
lib/rainbows/thread_timeout.rb