Skip to content

Avoid thread status race in read-write lock spec - #1126

Closed
headius wants to merge 0 commit into
ruby-concurrency:masterfrom
headius:codex/reentrant-read-write-lock-test-status
Closed

headius wants to merge 0 commit into
ruby-concurrency:masterfrom
headius:codex/reentrant-read-write-lock-test-status

Conversation

@headius

@headius headius commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

This spec has been failing sporadically on JRuby, and Codex believes this is due to a bad expectation that seeing a "sleep" status means the lock has been acquired. Lock acquisition may appear to sleep while attempting to acquire the lock, but this does not indicate that the lock has been successfully acquired. Use the waiter count to know that the lock is actually locked.

Generated by Codex so I'll be tweaking a bit myself.

@headius headius left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't like this fix and I'm having Codex examine other possibilities, including fixing the false "sleep" status during lock acquisition.

@headius
headius marked this pull request as draft November 25, 2026 21:48
@headius headius closed this Nov 25, 2026
@headius
headius force-pushed the codex/reentrant-read-write-lock-test-status branch from f3767c4 to 19d4ece Compare November 25, 2026 22:06

This branch was previously deployed

1 inactive deployment
github-pages — 19d4ecea Deployed Nov 17, 2026 by bensheldon via deploy #159
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.

1 participant