Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace MutexHook by MonitorHook to allow reentrancy #45857

Merged
merged 1 commit into from Aug 19, 2022

Conversation

casperisfine
Copy link
Contributor

Fix: #45852
Ref: #43550

If executor_around_test_case is enabled, all hooks must be reentrant. However allow_concurrency = false register a MutexHook that isn't reentrant.

So this commit replace it by a Monitor which does allow reentrancy.

cc @JiaboHou, @skipkayhil

@rails-bot rails-bot bot added the railties label Aug 19, 2022
Ref: rails#43550

If `executor_around_test_case` is enabled, all hooks must be
reentrant. However `allow_concurrency = false` register a
`MutexHook` that isn't reentrant.

So this commit replace it by a `Monitor` which does allow
reentrancy.
@byroot byroot merged commit da2a0a5 into rails:main Aug 19, 2022
byroot added a commit that referenced this pull request Aug 19, 2022
Replace MutexHook by MonitorHook to allow reentrancy
@skipkayhil
Copy link
Member

Nice! TIL about Monitor vs Mutex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling executor_around_test_case and disabling allow_concurrency fails controller tests
3 participants