diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2015-01-26 00:06:12 +0100 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2015-01-26 09:12:28 +0100 |
| commit | fde4472848b662a4d1236388c4cf15e2450237e6 (patch) | |
| tree | c63bee8a602f669fdde0bf9a1b34c332924c3992 /src/libstd/sys/windows | |
| parent | fff5600925cf3bbee2befd6957b727016765ebd0 (diff) | |
| download | rust-fde4472848b662a4d1236388c4cf15e2450237e6.tar.gz rust-fde4472848b662a4d1236388c4cf15e2450237e6.zip | |
Make Unix and Windows impls consistent
There are some explicit Send/Sync implementations for Window's types
that don't exist in Unix. While the end result will be the same, I
believe it's clearer if we keep the explicit implementations consistent
by making the os-specific types Send/Sync where needed and possible.
This commit addresses tcp. Existing differences below:
src/libstd/sys/unix/tcp.rs
unsafe impl Sync for TcpListener {}
unsafe impl Sync for AcceptorInner {}
src/libstd/sys/windows/tcp.rs
unsafe impl Send for Event {}
unsafe impl Sync for Event {}
unsafe impl Send for TcpListener {}
unsafe impl Sync for TcpListener {}
unsafe impl Send for TcpAcceptor {}
unsafe impl Sync for TcpAcceptor {}
unsafe impl Send for AcceptorInner {}
unsafe impl Sync for AcceptorInner {}
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/tcp.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libstd/sys/windows/tcp.rs b/src/libstd/sys/windows/tcp.rs index 77139b52efa..ebebeb1a8a5 100644 --- a/src/libstd/sys/windows/tcp.rs +++ b/src/libstd/sys/windows/tcp.rs @@ -116,9 +116,6 @@ pub struct TcpAcceptor { deadline: u64, } -unsafe impl Send for TcpAcceptor {} -unsafe impl Sync for TcpAcceptor {} - struct AcceptorInner { listener: TcpListener, abort: Event, @@ -126,7 +123,6 @@ struct AcceptorInner { closed: AtomicBool, } -unsafe impl Send for AcceptorInner {} unsafe impl Sync for AcceptorInner {} impl TcpAcceptor { |
