summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-16 21:49:06 +0000
committerGitHub <noreply@github.com>2021-10-16 21:49:06 +0000
commit212b0e5b24e86b605bdad07ae180cfd57c764661 (patch)
tree25eb9114e635495dc1d3206dfd53d79466007ec7
parent42bbed304a30a32eec5eab3fb51155c6aab7275b (diff)
parent6e7ddfa073a25abf33a89d001580160465070251 (diff)
downloadrust-libzfs-212b0e5b24e86b605bdad07ae180cfd57c764661.zip
Merge #74
74: NvList type is Send r=jmesmon a=ahrens The NvList type can be safely sent to other threads. Mark it as such by implementing `Send`. This is needed to use NvList's with async rust. Let me know if I've misunderstood the semantics of `Send`. It seems perfectly safe to operate on a `nvlist_t*` from a different thread, as long as it's only manipulated by one thread at a time. Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
-rw-r--r--nvpair/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/nvpair/src/lib.rs b/nvpair/src/lib.rs
index b98849d..a34d2bf 100644
--- a/nvpair/src/lib.rs
+++ b/nvpair/src/lib.rs
@@ -389,7 +389,7 @@ impl NvEncoding {
foreign_type! {
/// An `NvList`
- pub unsafe type NvList {
+ pub unsafe type NvList: Send {
type CType = sys::nvlist;
fn drop = sys::nvlist_free;
}