Skip to content

Implement Sync for ThreadsafeFitsFile#438

Open
simonrw wants to merge 1 commit intomainfrom
fix/threadsafe-sync-impl
Open

Implement Sync for ThreadsafeFitsFile#438
simonrw wants to merge 1 commit intomainfrom
fix/threadsafe-sync-impl

Conversation

@simonrw
Copy link
Owner

@simonrw simonrw commented Feb 10, 2026

Summary

  • Only Send was manually implemented for ThreadsafeFitsFile
  • Since the inner Mutex ensures exclusive access, Sync is also safe
  • Without Sync, &ThreadsafeFitsFile cannot be shared between threads (e.g. stored in Arc for shared references or used with rayon parallel iterators)

Test plan

  • All existing tests pass (including the 10,000-thread stress test)

🤖 Generated with Claude Code

Only Send was manually implemented. Since the inner Mutex ensures
exclusive access, Sync is also safe and allows &ThreadsafeFitsFile to be
shared between threads (e.g. with Arc or rayon parallel iterators).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Warning

Rate limit exceeded

@simonrw has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/threadsafe-sync-impl

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.5%. Comparing base (83b76a5) to head (61eac02).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
fitsio/src/threadsafe_fitsfile.rs 100.0% <ø> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants