-
Notifications
You must be signed in to change notification settings - Fork 46
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
Send
and Sync
#141
Comments
Context creation is cheap and e.g. creating one per thread using Pro::new mirrors the underlying libproj ProjCtx, which is intended to be created per thread. I'm not sure whether it would be safe to pass the wrapped raw pointer around, but it's unlikely that we'll try to do so without some evidence of a performance concern – the string slice used to create the context can be created immutably and shared / moved without concern, which provides a guarantee that instances created using it will perform identically. |
Yeah, it just makes storing it in an otherwise |
My understanding, and I very well might be wrong, is that so long as we're always fetching the error from the context (and not the global context), then it should be |
Opened a PR for |
This issue might be impossible to implement due to how the errors are retrieved (potential conditions on |
Having Could
|
What is the status about
Send
andSync
?There is no explicit unimpl note, but due to the raw-pointers, it is also not auto-impled on
Proj
.Is it safe to move the
Proj
instance between threads and have shared calls to.project
?If so, what about providing the impl:
If not, what about clarifying it in the docs / README.
Background: I would like to load and parse the proj-definition once and call the projection from different places in the application.
The text was updated successfully, but these errors were encountered: