class Dynflow::Middleware::Common::Singleton
Public Instance Methods
plan(*args)
click to toggle source
Each action tries to acquire its own lock before the action's plan
starts
# File lib/dynflow/middleware/common/singleton.rb, line 6 def plan(*args) action.singleton_lock! pass(*args) end
run(*args)
click to toggle source
At the start of run
we try to acquire action's lock unless it already holds it At the end the action tries to unlock its own lock if the execution plan has no
finalize phase
# File lib/dynflow/middleware/common/singleton.rb, line 14 def run(*args) action.singleton_lock! unless action.holds_singleton_lock? pass(*args) end