Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ActiveRecord::Delegation#method_missing threadsafe
Two threads may be in method_missing at the same time. If so, they might both try to define the same delegator method. Such a situation probably wouldn't result in a particularly spectacular bug as one method would probably just be overridden by an identical method, but it could cause warnings to pop up. (It could be worse if method definition is non-atomic in a particular implementation.) (We will also need this mutex shortly anyway, see #8127.)
- Loading branch information