Permalink
Browse files

fixed logic for case when @@method==:yield and :method=>(:fork|:thread)

  • Loading branch information...
1 parent 402e6e8 commit 844238b4c39b94214da38cd64be22760570a3807 @tra tra committed Nov 20, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −0 README
  2. +1 −1 lib/spawn.rb
View
1 README
@@ -115,6 +115,7 @@ Also thanks to all who have helped debug problems and suggest improvements inclu
Olivier Ruffin
Garry Tan, Matt Jankowski (Rails 2.2.x fixes)
Tim Kadom, Mauricio Marcon Zaffari, Danial Pearce, Hongli Lai, Scott Wadden (passenger fixes)
+ Adrian Duyzer, Cyrille Labesse
<your name here>
Copyright (c) 2007-present Tom Anderson (tom@squeat.com), see LICENSE
View
@@ -41,7 +41,7 @@ def self.close_resources
def spawn(options = {})
options.symbolize_keys!
# setting options[:method] will override configured value in @@method
- if options[:method] == :yield || @@method == :yield
+ if options[:method] == :yield || (options[:method] == nil && @@method == :yield)
yield
elsif options[:method] == :thread || (options[:method] == nil && @@method == :thread)
# for versions before 2.2, check for allow_concurrency

0 comments on commit 844238b

Please sign in to comment.