diff options
author | Casey Dahlin <cdahlin@redhat.com> | 2008-10-10 16:44:12 -0400 |
---|---|---|
committer | Casey Dahlin <cdahlin@redhat.com> | 2008-10-10 16:44:12 -0400 |
commit | 3f8f1ce641974780ef321ac402e5fe9df4e1dfaa (patch) | |
tree | d5eda740fa26e5acd932cda9188b9f3b55f10af1 /state.rb | |
parent | 0de5f0747905206cec88b47696ad178867ece286 (diff) | |
download | upstate-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.rb | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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 |