mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Try to require the fastthread library when using Ruby 1.8.6, to prevent deadlocks
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6513 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
f7cd2a1836
commit
144d2f70f8
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,14 @@
|
|||
if RUBY_VERSION == "1.8.6"
|
||||
begin
|
||||
require 'fastthread'
|
||||
rescue LoadError
|
||||
warn "You are running Ruby 1.8.6, which has a bug in its threading implementation."
|
||||
warn "You are liable to encounter deadlocks running Capistrano, unless you install"
|
||||
warn "the fastthread library, which is available as a gem:"
|
||||
warn " gem install fastthread"
|
||||
end
|
||||
end
|
||||
|
||||
require 'thread'
|
||||
require 'capistrano/errors'
|
||||
require 'capistrano/ssh'
|
||||
|
|
|
@ -33,4 +33,4 @@ unless defined?(TestExtensions)
|
|||
class Test::Unit::TestCase
|
||||
include TestExtensions
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue