about summary refs log tree commit homepage
path: root/lib/rainbows/thread_timeout.rb
DateCommit message (Collapse)
2015-11-21bump to unicorn 5.0.1, use monotonic clock
The timeout (mis)feature in unicorn uses the monotonic clock if available. We must follow suit to avoid having our timeout functionality completely broken.
2012-07-19thread_timeout: document additional caveats
Again, for the one thousandth time, timing out threads is very tricky business :<
2011-04-21thread_timeout: annotate as much as possible
This should make code review easier.
2011-04-21thread_timeout: document Thread.pass usage
Thread-switching sometimes takes too long under YARV, so we force a switch since the watchdog thread is lower-priority.
2011-04-11thread_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).
2011-01-06eliminate G constant and just use the Rainbows! module
Code organization is hard :<
2010-12-26more :: prefix elimination
This should make things easier on the eyes.
2010-12-20thread_timeout: fix bad comparison
This was causing unrelated requests to get killed every +timeout+ seconds, instead of only the ones that were running too long. Noticed-by: ghazel@gmail.com ref: http://mid.gmane.org/AANLkTi=7OhyTwkHsp_rXU7Gp1PokihiQ9bJigpO-BfN6@mail.gmail.com
2010-12-20thread_timeout: avoid a threading bug under 1.9
Because of the lack of GVL-releasing syscalls in this branch of the thread loop, we need Thread.pass to ensure other threads get scheduled appropriately under 1.9. This is likely a threading bug in 1.9 that warrants further investigation when we're in a better mood.
2010-12-09thread_timeout: de-Struct-ify
Avoid exposing internals, it's also slightly faster to access ivars directly rather than using method calls.
2010-08-19add Rainbows::ThreadTimeout middleware
This allows for per-dispatch timeouts similar to (but not exactly) the way Mongrel (1.1.x) implemented them with threads.