Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,29 @@ module Async | |
# Represents an asynchronous IO within a reactor. | ||
class Wrapper | ||
class Cancelled < StandardError | ||
class From | ||
def initialize | ||
@backtrace = caller[5..-1] | ||
end | ||
|
||
attr :backtrace | ||
|
||
def cause | ||
nil | ||
end | ||
|
||
def message | ||
"Cancelled" | ||
end | ||
end | ||
|
||
def initialize | ||
super "The operation has been cancelled!" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
eregon
|
||
|
||
@cause = From.new | ||
end | ||
|
||
attr :cause | ||
end | ||
|
||
# wait_readable, wait_writable and wait_any are not re-entrant, and will raise this failure. | ||
|
@nobu it would be better to write
super "...", cause: From.new