-
Notifications
You must be signed in to change notification settings - Fork 38
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
Implement Send for Document #123
Comments
You're right for a single document object in isolation, but I worry. Consider a program that builds a document, then extracts some nodes from it for manipulation, then hands off the document to another thread (via I had tried my hand at a |
If you don't need mutability, I could imagine extending the read-only treatment for nodes, which added a thread-safe |
Correct. And that's exactly the distinction between
Agreed. But
Agreed. Native
My use case is basically evaluating XPATHs, so no mutation. And yeah, I think |
Actually no, I don't think that is the difference. A For So yes, let root: RoNode = doc.get_root_readonly().unwrap(); |
Document is declared as follows:
Now, looking into libxml sources, neither
struct _xmlDoc
norstruct _xmlNode
contain any thread local data. Therefore, it should be possible for theDocument
to have Send trait.The text was updated successfully, but these errors were encountered: