diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-12-22 20:50:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 20:50:55 +0000 |
commit | 6c6c576dc043aeee5a814490ec8c4665283580ae (patch) | |
tree | a475ddd9c64002b5915fe79c3155e1ae8551a618 /src/sys | |
parent | 5f714675897cc204a987a373a6f2a2f14dfb181f (diff) | |
parent | 2d45fab9f36110de95a4e91e78c546c44e82a306 (diff) | |
download | nix-6c6c576dc043aeee5a814490ec8c4665283580ae.zip |
Merge #1582
1582: impl Send and Sync for IoVec r=rtzoeller a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/uio.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sys/uio.rs b/src/sys/uio.rs index 52324020..125c2e6c 100644 --- a/src/sys/uio.rs +++ b/src/sys/uio.rs @@ -228,3 +228,8 @@ impl<'a> IoVec<&'a mut [u8]> { }, PhantomData) } } + +// The only reason IoVec isn't automatically Send+Sync is because libc::iovec +// contains raw pointers. +unsafe impl<T> Send for IoVec<T> where T: Send {} +unsafe impl<T> Sync for IoVec<T> where T: Sync {} |