File tree 2 files changed +6
-13
lines changed 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,9 @@ impl Drop for Event {
129
129
}
130
130
}
131
131
132
+ unsafe impl Send for Event { }
133
+ unsafe impl Sync for Event { }
134
+
132
135
struct Inner {
133
136
handle : libc:: HANDLE ,
134
137
lock : Mutex < ( ) > ,
@@ -156,6 +159,9 @@ impl Drop for Inner {
156
159
}
157
160
}
158
161
162
+ unsafe impl Send for Inner { }
163
+ unsafe impl Sync for Inner { }
164
+
159
165
unsafe fn pipe ( name : * const u16 , init : bool ) -> libc:: HANDLE {
160
166
libc:: CreateNamedPipeW (
161
167
name,
@@ -220,9 +226,6 @@ pub struct UnixStream {
220
226
write_deadline : u64 ,
221
227
}
222
228
223
- unsafe impl Send for UnixStream { }
224
- unsafe impl Sync for UnixStream { }
225
-
226
229
impl UnixStream {
227
230
fn try_connect ( p : * const u16 ) -> Option < libc:: HANDLE > {
228
231
// Note that most of this is lifted from the libuv implementation.
@@ -615,17 +618,11 @@ pub struct UnixAcceptor {
615
618
deadline : u64 ,
616
619
}
617
620
618
- unsafe impl Send for UnixAcceptor { }
619
- unsafe impl Sync for UnixAcceptor { }
620
-
621
621
struct AcceptorState {
622
622
abort : Event ,
623
623
closed : AtomicBool ,
624
624
}
625
625
626
- unsafe impl Send for AcceptorState { }
627
- unsafe impl Sync for AcceptorState { }
628
-
629
626
impl UnixAcceptor {
630
627
pub fn accept ( & mut self ) -> IoResult < UnixStream > {
631
628
// This function has some funky implementation details when working with
Original file line number Diff line number Diff line change @@ -116,17 +116,13 @@ pub struct TcpAcceptor {
116
116
deadline : u64 ,
117
117
}
118
118
119
- unsafe impl Send for TcpAcceptor { }
120
- unsafe impl Sync for TcpAcceptor { }
121
-
122
119
struct AcceptorInner {
123
120
listener : TcpListener ,
124
121
abort : Event ,
125
122
accept : Event ,
126
123
closed : AtomicBool ,
127
124
}
128
125
129
- unsafe impl Send for AcceptorInner { }
130
126
unsafe impl Sync for AcceptorInner { }
131
127
132
128
impl TcpAcceptor {
You can’t perform that action at this time.
0 commit comments