mirror of
https://github.com/github/rails.git
synced 2026-01-23 05:17:59 -05:00
All the memory-based stores should use a mutex #611 [inspire22]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -305,13 +305,13 @@ module ActionController #:nodoc:
|
||||
|
||||
class DRbStore < MemoryStore #:nodoc:
|
||||
def initialize(address = 'druby://localhost:9192')
|
||||
@data = DRbObject.new(nil, address)
|
||||
@data, @mutex = DRbObject.new(nil, address), Mutex.new
|
||||
end
|
||||
end
|
||||
|
||||
class MemCacheStore < MemoryStore #:nodoc:
|
||||
def initialize(address = 'localhost')
|
||||
@data = MemCache.new(address)
|
||||
@data, @mutex = MemCache.new(address), Mutex.new
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user