8000 fix: make timeoutMillis and timeoutStatus volatile by kawasima · Pull Request #147 · enkan/enkan · GitHub
[go: up one dir, main page]

Skip to content

fix: make timeoutMillis and timeoutStatus volatile - #147

Merged
kawasima merged 1 commit into
developenkan/enkan:developfrom
fix/timeout-volatile-fields
Apr 4, 2026
Merged

kawasima merged 1 commit into
developfrom
fix/timeout-volatile-fields

Conversation

@kawasima
@kawasima kawasima commented Apr 4, 2026
Copy link
Copy Markdown
Collaborator

Summary

  • timeoutMillis and timeoutStatus in RequestTimeoutMiddleware were plain fields without volatile
  • Without volatile, the JMM does not guarantee visibility to the handler thread if the fields were written by a different thread at configuration time (e.g., a DI container wiring thread)
  • Consistent with ForwardedMiddleware, which already uses volatile for its settable fields

🤖 Generated with Claude Code

…isibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kawasima
kawasima merged commit 5ec0b3c into develop Apr 4, 2026
@kawasima
kawasima deleted the fix/timeout-volatile-fields branch April 4, 2026 00:32
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

0