From ddcc67115c8863d053f8286efe21db74e1678b44 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 2 Jan 2005 16:00:50 +0000 Subject: Added thread-safety to the DRbStore #66, #389 [Ben Stiglitz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ .../lib/action_controller/session/drb_server.rb | 25 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index cabfe52d15..d504b59e23 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added thread-safety to the DRbStore #66, #389 [Ben Stiglitz] + * Added DateHelper#select_time and DateHelper#select_second #373 [Scott Baron] * Added class declaration for the MissingFile exception #388 [Kent Sibilev] diff --git a/actionpack/lib/action_controller/session/drb_server.rb b/actionpack/lib/action_controller/session/drb_server.rb index 6005b8b2b3..6f90db6747 100644 --- a/actionpack/lib/action_controller/session/drb_server.rb +++ b/actionpack/lib/action_controller/session/drb_server.rb @@ -5,5 +5,28 @@ require 'drb' -DRb.start_service('druby://127.0.0.1:9192', Hash.new) +session_hash = Hash.new +session_hash.instance_eval { @mutex = Mutex.new } + +class <