lib/async/task.rb in async-2.6.2 vs lib/async/task.rb in async-2.6.3
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
# Released under the MIT License.
-# Copyright, 2017-2022, by Samuel Williams.
+# Copyright, 2017-2023, by Samuel Williams.
# Copyright, 2017, by Kent Gruber.
# Copyright, 2017, by Devin Christensen.
# Copyright, 2020, by Patrik Wenger.
require 'fiber'
@@ -35,29 +35,9 @@
def initialize(message = "execution expired")
super
end
end
- # Encapsulates the state of a running task and it's result.
- #
- # ```mermaid
- # stateDiagram-v2
- # [*] --> Initialized
- # Initialized --> Running : Run
- #
- # Running --> Completed : Return Value
- # Running --> Failed : Exception
- #
- # Completed --> [*]
- # Failed --> [*]
- #
- # Running --> Stopped : Stop
- # Stopped --> [*]
- # Completed --> Stopped : Stop
- # Failed --> Stopped : Stop
- # Initialized --> Stopped : Stop
- # ```
- #
# @public Since `stable-v1`.
class Task < Node
class FinishedError < RuntimeError
def initialize(message = "Cannot create child task within a task that has finished execution!")
super