Skip to content

Commit 1a73ccc

Browse files
committed
Make trait's impls consistent for unix/windows
1 parent 11f71ec commit 1a73ccc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libstd/sys/unix/pipe.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ pub struct UnixStream {
117117
write_deadline: u64,
118118
}
119119

120+
unsafe impl Send for UnixStream {}
121+
unsafe impl Sync for UnixStream {}
122+
120123
impl UnixStream {
121124
pub fn connect(addr: &CString,
122125
timeout: Option<u64>) -> IoResult<UnixStream> {
@@ -215,6 +218,7 @@ pub struct UnixListener {
215218
path: CString,
216219
}
217220

221+
unsafe impl Send for UnixListener {}
218222
unsafe impl Sync for UnixListener {}
219223

220224
impl UnixListener {
@@ -261,6 +265,7 @@ struct AcceptorInner {
261265
closed: atomic::AtomicBool,
262266
}
263267

268+
unsafe impl Send for AcceptorInner {}
264269
unsafe impl Sync for AcceptorInner {}
265270

266271
impl UnixAcceptor {

0 commit comments

Comments
 (0)