diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2014-12-27 11:02:47 +0100 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2014-12-27 12:40:25 +0100 |
| commit | 11f71ec7016952744f999dd6e668825490b1855f (patch) | |
| tree | 71d303a2d9375ac00e692bd36835c0305ac707df /src/libstd/sys/windows | |
| parent | f5d619caf9f32458680fae55526b99582ca682dd (diff) | |
| download | rust-11f71ec7016952744f999dd6e668825490b1855f.tar.gz rust-11f71ec7016952744f999dd6e668825490b1855f.zip | |
Implement Sync/Send for windows' UnixStream
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/pipe.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs index 11226f53e17..fc3640f2604 100644 --- a/src/libstd/sys/windows/pipe.rs +++ b/src/libstd/sys/windows/pipe.rs @@ -214,6 +214,9 @@ pub struct UnixStream { write_deadline: u64, } +unsafe impl Send for UnixStream {} +unsafe impl Sync for UnixStream {} + impl UnixStream { fn try_connect(p: *const u16) -> Option<libc::HANDLE> { // Note that most of this is lifted from the libuv implementation. @@ -559,6 +562,7 @@ pub struct UnixListener { name: CString, } +unsafe impl Send for UnixListener {} unsafe impl Sync for UnixListener {} impl UnixListener { @@ -605,6 +609,7 @@ pub struct UnixAcceptor { deadline: u64, } +unsafe impl Send for UnixAcceptor {} unsafe impl Sync for UnixAcceptor {} struct AcceptorState { @@ -612,6 +617,7 @@ struct AcceptorState { closed: atomic::AtomicBool, } +unsafe impl Send for AcceptorState {} unsafe impl Sync for AcceptorState {} impl UnixAcceptor { |
