class FiberInterrupt
Used to defer stopping the current task until later.
Definitions
def initialize(fiber, exception)
Create a new stop later operation.
Signature
-
parameter
task
Task
The task to stop later.
Implementation
def initialize(fiber, exception)
@fiber = fiber
@exception = exception
end
def alive?
Signature
-
returns
Boolean
Whether the task is alive.
Implementation
def alive?
@fiber.alive?
end
def transfer
Transfer control to the operation - this will stop the task.
Implementation
def transfer
# Fiber.blocking{$stderr.puts "FiberInterrupt#transfer(#{@fiber}, #{@exception})"}
@fiber.raise(@exception)
end