Skip to content

Commit

Permalink
Note that allow_concurrency = true means you need to verify_active_co…
Browse files Browse the repository at this point in the history
…nnections! to clear out connections assigned to stale threads.
  • Loading branch information
jeremy committed Apr 29, 2008
1 parent 90f6062 commit 1c66ece
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion activerecord/lib/active_record/base.rb
Expand Up @@ -423,7 +423,9 @@ def self.reset_subclasses #:nodoc:
@@default_timezone = :local

# Determines whether to use a connection for each thread, or a single shared connection for all threads.
# Defaults to false. Set to true if you're writing a threaded application.
# Defaults to false. If you're writing a threaded application, set to true
# and periodically call verify_active_connections! to clear out connections
# assigned to stale threads.
cattr_accessor :allow_concurrency, :instance_writer => false
@@allow_concurrency = false

Expand Down

2 comments on commit 1c66ece

@josh
Copy link
Contributor

@josh josh commented on 1c66ece Apr 29, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to get Mongrel to look at this option. The current handler forces a mutex on you whether you have it set or not.

@jeremy
Copy link
Member Author

@jeremy jeremy commented on 1c66ece Apr 29, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same flag on AC::Base, yeah.

Please sign in to comment.