阅读背景:

单例类是否会在多线程应用程序中产生问题?

来源:互联网 

This might be premature optimization, or premature over-cautionization, but I'm avoiding using singletons on a few classes because I'm concerned that down the road I'll need to run my app as multi-threaded, and that the singletons will create conflicts and messiness. Do singletons have this issue in Ruby, or is there some kind of built in namespace so that when an a class refers to the singleton, only the singleton on the same thread is returned?This might be premature optimization, or premat




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: