You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@rwestphal Hi, I wonder is context concurrent safe? In this crate it's all raw pointers and actually should not be impl send and sync, but I don't know if the c library is concurrent safe? If so I think it's fine.
By the way, would you mind establishing a little community of this crate? Or should I keep bother you with issues?
The text was updated successfully, but these errors were encountered:
@rwestphal Hi, I wonder is context concurrent safe? In this crate it's all raw pointers and actually should not be impl send and sync, but I don't know if the c library is concurrent safe? If so I think it's fine.
Since all yang2-rs functions that modify YANG contexts or data trees require mutable references, the borrow checker verifies at compile time if libyang's rules are being followed.
It shouldn't be possible, for example, to modify one data tree in one thread while reading the same data tree in another thread (or async task). The only way to do that would be by using a mutex or another synchronization primitive to ensure safe concurrent access.
Be mindful, however, that yang2-rs is only thread-safe as long as libyang withstands its promises.
By the way, would you mind establishing a little community of this crate? Or should I keep bother you with issues?
Please don't hesitate to open new issues whenever necessary, I do the same in the libyang repo ^^ I could open a Discord channel for this crate, but at this point that would be an overkill since there aren't many people using it.
@rwestphal thanks! Just finished reading context part of codes, your construction of Set is pretty decent, I am writing same ffi project on golang, and I have to say golang has a weaker type system, I find it hard to translate your code into golang code, even with its generics.
@rwestphal Hi, I wonder is context concurrent safe? In this crate it's all raw pointers and actually should not be impl send and sync, but I don't know if the c library is concurrent safe? If so I think it's fine.
By the way, would you mind establishing a little community of this crate? Or should I keep bother you with issues?
The text was updated successfully, but these errors were encountered: