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

Rust threadsafety annotation changed in release 2.6.0 #258

Open
aseyboldt opened this issue Dec 23, 2024 · 1 comment · Fixed by #259
Open

Rust threadsafety annotation changed in release 2.6.0 #258

aseyboldt opened this issue Dec 23, 2024 · 1 comment · Fixed by #259

Comments

@aseyboldt
Copy link
Contributor

In version 2.5.0 the StanLibrary struct was marked as Send and Sync:
https://docs.rs/bridgestan/2.5.0/bridgestan/struct.StanLibrary.html#synthetic-implementations
But in 2.6.0 the same struct is marked as not Send and Sync:
https://docs.rs/bridgestan/latest/bridgestan/struct.StanLibrary.html#synthetic-implementations

If some entry on the c-side changed from const to non-const, that might explain why this is suddenly different, but I couldn't find any such change.
So maybe the update of bindgen triggered this?

I think StanLibrary is in fact threadsafe, I can't see any reason why different threads couldn't create models at the same time? But maybe I'm missing something on the C++ side...

If we think it should be safe, I can make a simple PR that informs rust about this.

@WardBrian
Copy link
Collaborator

I'm re-opening this issue until we actually release the patch as a reminder to myself

@WardBrian WardBrian reopened this Dec 23, 2024
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 a pull request may close this issue.

2 participants