From 0e2477b602b3aa5b66c849d19737a8b66c73f633 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 29 Nov 2011 15:04:41 -0800 Subject: Automatic closure of connections in threads is deprecated. For example the following code is deprecated: Thread.new { Post.find(1) }.join It should be changed to close the database connection at the end of the thread: Thread.new { Post.find(1) Post.connection.close }.join Only people who spawn threads in their application code need to worry about this change. --- activerecord/CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 62dc19a988..1a95b8e95e 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,21 @@ ## Rails 3.2.0 (unreleased) ## +* Automatic closure of connections in threads is deprecated. For example + the following code is deprecated: + + Thread.new { Post.find(1) }.join + + It should be changed to close the database connection at the end of + the thread: + + Thread.new { + Post.find(1) + Post.connection.close + }.join + + Only people who spawn threads in their application code need to worry + about this change. + * Deprecated: * `set_table_name` -- cgit v1.2.3