Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ globset = "0.4"
jsonrpc-core = { version = "14.0", path = "../core" }
lazy_static = "1.1.0"
log = "0.4"
tokio = { version = "0.1" }
tokio = { version = "0.1.15" }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokio = "0.1.22" is the latest BTW

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but we don't really require the latest. I just tested that 0.1.15 is enough to fix the Send + Sync issue, so that's the minimal version we support.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right, cool I was confused by the commit message then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah. Good point :) I wasn't paying that much attention when writing it.

tokio-codec = { version = "0.1" }
unicase = "2.0"

Expand Down
12 changes: 12 additions & 0 deletions server-utils/src/reactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,15 @@ impl RpcEventLoop {
});
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn make_sure_rpc_event_loop_is_send_and_sync() {
fn is_send_and_sync<T: Send + Sync>() {}

is_send_and_sync::<RpcEventLoop>();
}
}
12 changes: 12 additions & 0 deletions tcp/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,15 @@ impl Drop for Server {
}
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn server_is_send_and_sync() {
fn is_send_and_sync<T: Send + Sync>() {}

is_send_and_sync::<Server>();
}
}