diff options
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r-- | lib/timeout.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb index d4ea758acd..75340d52dd 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -32,11 +32,11 @@ def timeout(sec) x = Thread.current y = Thread.start { sleep sec - x.raise TimeoutError, "execution expired" if x.status + x.raise TimeoutError, "execution expired" if x.alive? } yield sec return true ensure - Thread.kill y if y.status + Thread.kill y if y.alive? end end |