lib/polyphony/extensions/fiber.rb
# Stops a fiber by raising a Polyphony::Cancel exception.
#
# @param exception [Class, Exception] exception or exception class
# @return [Fiber] self
Stops a fiber by raising a Polyphony::Cancel exception.
Stops a fiber by raising a Polyphony :: Cancel exception .
def cancel(exception = Polyphony::Cancel)
      return if @running == false
      value = (Class === exception) ? exception.new : exception
      schedule value
      self
    end
def cancel ( exception = Polyphony :: Cancel ) return if @running == false value = ( Class === exception ) ? exception . new : exception schedule value self end
Stops a fiber by raising a Polyphony::Cancel exception.
Stops a fiber by raising a Polyphony :: Cancel exception .
None
Fiber
exception
exception or exception class
exception or exception class