Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
e5dc756b
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e5dc756b
编写于
8月 11, 2017
作者:
R
Ryuta Kamizono
提交者:
GitHub
8月 11, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #30197 from ohbarye/fix-rdoc-code-formatting
Fix RDoc formatting: `+` doesn't work with `@` [ci skip]
上级
98298092
b99ef016
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
actionview/lib/action_view/renderer/partial_renderer.rb
actionview/lib/action_view/renderer/partial_renderer.rb
+1
-1
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
...ve_record/connection_adapters/abstract/connection_pool.rb
+5
-5
activerecord/lib/active_record/transactions.rb
activerecord/lib/active_record/transactions.rb
+1
-1
未找到文件。
actionview/lib/action_view/renderer/partial_renderer.rb
浏览文件 @
e5dc756b
...
...
@@ -355,7 +355,7 @@ def render_partial
# finds the options and details and extracts them. The method also contains
# logic that handles the type of object passed in as the partial.
#
# If +options[:partial]+ is a string, then the
+@path+
instance variable is
# If +options[:partial]+ is a string, then the
<tt>@path</tt>
instance variable is
# set to that string. Otherwise, the +options[:partial]+ object must
# respond to +to_partial_path+ in order to setup the path.
def
setup
(
context
,
options
,
block
)
...
...
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
浏览文件 @
e5dc756b
...
...
@@ -270,7 +270,7 @@ def with_a_bias_for(thread)
# Connections must be leased while holding the main pool mutex. This is
# an internal subclass that also +.leases+ returned connections while
# still in queue's critical section (queue synchronizes with the same
#
+@lock+
as the main pool) so that a returned connection is already
#
<tt>@lock</tt>
as the main pool) so that a returned connection is already
# leased and there is no need to re-enter synchronized block.
class
ConnectionLeasingQueue
<
Queue
# :nodoc:
include
BiasableQueue
...
...
@@ -338,7 +338,7 @@ def initialize(spec)
# then that +thread+ does indeed own that +conn+. However, an absence of a such
# mapping does not mean that the +thread+ doesn't own the said connection. In
# that case +conn.owner+ attr should be consulted.
# Access and modification of
+@thread_cached_conns+
does not require
# Access and modification of
<tt>@thread_cached_conns</tt>
does not require
# synchronization.
@thread_cached_conns
=
Concurrent
::
Map
.
new
(
initial_capacity:
@size
)
...
...
@@ -737,10 +737,10 @@ def with_new_connections_blocked
# Implementation detail: the connection returned by +acquire_connection+
# will already be "+connection.lease+ -ed" to the current thread.
def
acquire_connection
(
checkout_timeout
)
# NOTE: we rely on
+@available.poll+
and +try_to_checkout_new_connection+ to
# NOTE: we rely on
<tt>@available.poll</tt>
and +try_to_checkout_new_connection+ to
# +conn.lease+ the returned connection (and to do this in a +synchronized+
# section). This is not the cleanest implementation, as ideally we would
# <tt>synchronize { conn.lease }</tt> in this method, but by leaving it to
+@available.poll+
# <tt>synchronize { conn.lease }</tt> in this method, but by leaving it to
<tt>@available.poll</tt>
# and +try_to_checkout_new_connection+ we can piggyback on +synchronize+ sections
# of the said methods and avoid an additional +synchronize+ overhead.
if
conn
=
@available
.
poll
||
try_to_checkout_new_connection
...
...
@@ -764,7 +764,7 @@ def new_connection
end
end
# If the pool is not at a
+@size+
limit, establish new connection. Connecting
# If the pool is not at a
<tt>@size</tt>
limit, establish new connection. Connecting
# to the DB is done outside main synchronized section.
#--
# Implementation constraint: a newly established connection returned by this
...
...
activerecord/lib/active_record/transactions.rb
浏览文件 @
e5dc756b
...
...
@@ -472,7 +472,7 @@ def has_transactional_callbacks?
# if it's associated with a transaction, then the state of the Active Record
# object will be updated to reflect the current state of the transaction.
#
# The
+@transaction_state+
variable stores the states of the associated
# The
<tt>@transaction_state</tt>
variable stores the states of the associated
# transaction. This relies on the fact that a transaction can only be in
# one rollback or commit (otherwise a list of states would be required).
# Each Active Record object inside of a transaction carries that transaction's
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录