mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Ivar += in MRI is thread safe"
This reverts commit dd1aa73889
.
Since this ivar is updated in a synchronize block just below,
and has to be protected from other threads
Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
This commit is contained in:
parent
c76987503a
commit
c42b355c39
1 changed files with 1 additions and 5 deletions
|
@ -822,13 +822,9 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def with_new_connections_blocked
|
||||
if RUBY_ENGINE == "ruby"
|
||||
@threads_blocking_new_connections += 1
|
||||
else
|
||||
synchronize do
|
||||
@threads_blocking_new_connections += 1
|
||||
end
|
||||
end
|
||||
|
||||
yield
|
||||
ensure
|
||||
|
|
Loading…
Reference in a new issue