Class: Syskit::NetworkGeneration::Async::Resolution
- Inherits:
-
Concurrent::Future
- Object
- Concurrent::Future
- Syskit::NetworkGeneration::Async::Resolution
- Defined in:
- lib/syskit/network_generation/async.rb
Instance Attribute Summary collapse
-
#engine ⇒ Object
readonly
Returns the value of attribute engine.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#requirement_tasks ⇒ Object
readonly
Returns the value of attribute requirement_tasks.
Instance Method Summary collapse
- #cancel ⇒ Object
-
#initialize(plan, event_logger, requirement_tasks, **options, &block) ⇒ Resolution
constructor
A new instance of Resolution.
Constructor Details
#initialize(plan, event_logger, requirement_tasks, **options, &block) ⇒ Resolution
Returns a new instance of Resolution
44 45 46 47 48 49 |
# File 'lib/syskit/network_generation/async.rb', line 44 def initialize(plan, event_logger, requirement_tasks, **, &block) @plan = plan @requirement_tasks = requirement_tasks.to_set @engine = Engine.new(plan, event_logger: event_logger) super(**, &block) end |
Instance Attribute Details
#engine ⇒ Object (readonly)
Returns the value of attribute engine
42 43 44 |
# File 'lib/syskit/network_generation/async.rb', line 42 def engine @engine end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan
40 41 42 |
# File 'lib/syskit/network_generation/async.rb', line 40 def plan @plan end |
#requirement_tasks ⇒ Object (readonly)
Returns the value of attribute requirement_tasks
41 42 43 |
# File 'lib/syskit/network_generation/async.rb', line 41 def requirement_tasks @requirement_tasks end |
Instance Method Details
#cancel ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/syskit/network_generation/async.rb', line 51 def cancel add_observer do self.plan.execution_engine.once do if !engine.work_plan.finalized? engine.work_plan.discard_transaction end end end super end |