Method: Thread::Pool::Task#terminate!
- Defined in:
- lib/thread/pool.rb
#terminate!(exception = Asked) ⇒ Object
Terminate the exception with an optionally given exception.
90 91 92 93 94 95 96 97 98 |
# File 'lib/thread/pool.rb', line 90 def terminate!(exception = Asked) return if terminated? || finished? || timeout? @terminated = true return unless running? self.raise exception end |