33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/roby/task_structure/conflicts.rb', line 33
def calling(context)
super
return unless symbol == :start
result = Set.new
task.each_conflicts do |conflicting_task|
result << conflicting_task
end
models = task.class.conflicting_models
for model in models
for t in plan.find_tasks(model)
if t.running? && t != task
result << t
end
end
end
unless result.empty?
plan.control.conflict(task, result)
return
end
models = task.class.conflicting_models
for model in models
for t in plan.find_tasks(model)
t.conflicts_with task if t.pending? && t != task
end
end
end
|