summaryrefslogtreecommitdiffstats
path: root/state.rb
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-10-10 16:44:12 -0400
committerCasey Dahlin <cdahlin@redhat.com>2008-10-10 16:44:12 -0400
commit3f8f1ce641974780ef321ac402e5fe9df4e1dfaa (patch)
treed5eda740fa26e5acd932cda9188b9f3b55f10af1 /state.rb
parent0de5f0747905206cec88b47696ad178867ece286 (diff)
downloadupstate-3f8f1ce641974780ef321ac402e5fe9df4e1dfaa.tar.gz
upstate-3f8f1ce641974780ef321ac402e5fe9df4e1dfaa.tar.xz
upstate-3f8f1ce641974780ef321ac402e5fe9df4e1dfaa.zip
Merge State#break_holds into State#becomes_defunct
No point in having this little two-liner called in one place only.
Diffstat (limited to 'state.rb')
-rw-r--r--state.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/state.rb b/state.rb
index b82b81f..25cbb2c 100644
--- a/state.rb
+++ b/state.rb
@@ -179,7 +179,8 @@ class State
def becomes_defunct(drop=false)
return unless @status == :up
@status = :dropping
- break_holds if @holds.size > 0
+ @holds.each{ |x| x.clear }
+ @holds = Set.new
self.class.falling_edge.call(params) if drop
@deps.each{ |x| x.state.release(self) }
@hold_params = {}
@@ -312,12 +313,6 @@ private
@status = :up
State.depsolve_all
end
-
- # Inform other states that they may no longer depend on this one
- def break_holds
- @holds.each{ |x| x.clear }
- @holds = Set.new
- end
end
=begin rdoc