独angular兽和copy_on_write_friendly?

在研究Unicornconfiguration选项时,我遇到了这个片段。

GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true 

如果我正确地做了,它会优化Unicorn如何处理内存分配和工人之间的资源共享?

我使用独angular兽来为我的Sinatra应用程序在Ruby 1.9.3服务器上运行。 在我的独angular兽configuration中包含copy_on_write_friendly设置有什么缺点吗?

这不是一个configuration选项,它是一个Ruby代码片段,告诉它如果GC对象具有该方法,则设置copy_on_write_friendly。 例如,在ruby主线1.9.2p290:

 1.9.2p290 :003 > GC.copy_on_write_friendly NoMethodError: undefined method `copy_on_write_friendly' for GC:Module from (irb):3 from /Users/kyle/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>' 

据我所知,唯一支持该选项的Ruby解释器是Ruby Enterprise Edition。 这里有一点: http : //www.rubyenterpriseedition.com/faq.html