• A
    Automatic closure of connections in threads is deprecated. For example · 0e2477b6
    Aaron Patterson 提交于
    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.
    0e2477b6
connection_pool_test.rb 2.4 KB