mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b5e670a9dd
Make #with_lock as expressive as calling #transaction and #lock! individually to enable behavior like so: person.with_lock("FOR UPDATE NOWAIT", requires_new: true) do ... end Helps teams who prefer #with_lock over #lock! to ensure the lock is taken out within a transaction, even when advanced transaction control is required without requiring redundant transaction blocks. |
||
---|---|---|
.. | ||
optimistic.rb | ||
pessimistic.rb |