diff options
author | thedarkone <thedarkone2@gmail.com> | 2015-05-14 03:14:53 +0200 |
---|---|---|
committer | thedarkone <thedarkone2@gmail.com> | 2015-05-14 03:14:53 +0200 |
commit | 603fe20c0b8c05bc1cca8d01caadbd7060518141 (patch) | |
tree | 092c7288b0d88851fd7e62fd9cb4c9d23c836abc /activesupport | |
parent | e92f5a99d6a6306d96b4c7dd8f96c2822f2f2c7b (diff) | |
download | rails-603fe20c0b8c05bc1cca8d01caadbd7060518141.tar.gz rails-603fe20c0b8c05bc1cca8d01caadbd7060518141.tar.bz2 rails-603fe20c0b8c05bc1cca8d01caadbd7060518141.zip |
AR::ConPool - remove synchronization around connection cache.
Renamed `@reserved_connections` -> `@thread_cached_conns`. New name
clearly conveys the purpose of the cache, which is to speed-up
`#connection` method.
The new `@thread_cached_conns` now also uses `Thread` objects as keys
(instead of previously `Thread.current.object_id`).
Since there is no longer any synchronization around
`@thread_cached_conns`, `disconnect!` and `clear_reloadable_connections!`
methods now pre-emptively obtain ownership (via `checkout`) of all
existing connections, before modifying internal data structures.
A private method `release` has been renamed `thread_conn_uncache` to
clear-up its purpose.
Fixed some brittle `thread.status == "sleep"` tests (threads can go
into sleep even without locks).
Diffstat (limited to 'activesupport')
0 files changed, 0 insertions, 0 deletions