diff options
author | Alan Somers <asomers@gmail.com> | 2021-10-22 20:00:02 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-12-21 06:30:09 -0700 |
commit | 2d45fab9f36110de95a4e91e78c546c44e82a306 (patch) | |
tree | a475ddd9c64002b5915fe79c3155e1ae8551a618 /src | |
parent | 5f714675897cc204a987a373a6f2a2f14dfb181f (diff) | |
download | nix-2d45fab9f36110de95a4e91e78c546c44e82a306.zip |
impl Send and Sync for IoVec
Diffstat (limited to 'src')
-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 {} |