Skip to content

Thread safety in with_accessible_by_strategy block#871

Open
NikosVlagoidis wants to merge 2 commits into
CanCanCommunity:developfrom
pennylane-hq:thread-safety-in-with-accessible-by-strategy-block
Open

Thread safety in with_accessible_by_strategy block#871
NikosVlagoidis wants to merge 2 commits into
CanCanCommunity:developfrom
pennylane-hq:thread-safety-in-with-accessible-by-strategy-block

Conversation

@NikosVlagoidis

Copy link
Copy Markdown

Follow-up from the initial implementation #675

@ghiculescu as we just discussed!

@NikosVlagoidis

Copy link
Copy Markdown
Author

@ghiculescu Hey sorry for the ping. Is this being merged soon?

@ghiculescu

Copy link
Copy Markdown
Contributor

I'm not a committor on this repo, so it will need someone else to review it. It looks good to me.

@tdeo

tdeo commented May 23, 2025

Copy link
Copy Markdown

@coorasse could you have a look at this by any chance please?

@CJStadler CJStadler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I have encountered this bug in a production Rails application running on Puma. It caused a small percentage of requests to fail non-deterministically because the strategy was changed in a different thread.

I've tested that this PR fixes the issue in our application. Thank you @NikosVlagoidis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants