1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

fix synchronization issue with Gateway initialization

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2007-03-30 19:40:26 +00:00
parent 0e774ac0d0
commit e7e4f90a1c
2 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,7 @@
*SVN* *SVN*
* Fix synchronization issue with Gateway initialization [Doug Barth]
* Added opt-in "compat" and "upgrade" recipes for tasks to aid in the upgrade process to Capistrano 2 [Jamis Buck] * Added opt-in "compat" and "upgrade" recipes for tasks to aid in the upgrade process to Capistrano 2 [Jamis Buck]
* The deployment recipes are now opt-in. Just do 'load "deploy"' in your recipe script. [Jamis Buck] * The deployment recipes are now opt-in. Just do 'load "deploy"' in your recipe script. [Jamis Buck]

View file

@ -38,18 +38,18 @@ module Capistrano
mutex = Mutex.new mutex = Mutex.new
waiter = ConditionVariable.new waiter = ConditionVariable.new
@thread = Thread.new do
logger.trace "starting connection to gateway `#{server.host}'" if logger
SSH.connect(server, @options) do |@session|
logger.trace "gateway connection established" if logger
Thread.pass
mutex.synchronize { waiter.signal }
@session.loop { !@terminate_thread }
end
end
mutex.synchronize do mutex.synchronize do
Thread.pass @thread = Thread.new do
logger.trace "starting connection to gateway `#{server.host}'" if logger
SSH.connect(server, @options) do |@session|
logger.trace "gateway connection established" if logger
mutex.synchronize { waiter.signal }
@session.loop do
!@terminate_thread
end
end
end
waiter.wait(mutex) waiter.wait(mutex)
end end
end end