Update ipc-channel and crossbeam-channel.

This commit is contained in:
Josh Matthews 2020-02-19 17:07:29 -05:00
parent 107a29121c
commit 3fd3c23e17
45 changed files with 362 additions and 168 deletions

View file

@ -15,10 +15,10 @@ energy-profiling = ["energymon", "energy-monitor"]
[dependencies]
bincode = "1"
crossbeam-channel = "0.3"
crossbeam-channel = "0.4"
energy-monitor = {version = "0.2.0", optional = true}
energymon = {git = "https://github.com/energymon/energymon-rust.git", optional = true}
ipc-channel = "0.12"
ipc-channel = "0.14"
log = "0.4"
serde = "1.0"
servo_config = {path = "../config"}

View file

@ -21,7 +21,7 @@ impl<T> IpcReceiver<T>
where
T: for<'de> Deserialize<'de> + Serialize,
{
pub fn recv(&self) -> Result<T, bincode::Error> {
pub fn recv(&self) -> Result<T, ipc::IpcError> {
time::profile(
ProfilerCategory::IpcReceiver,
None,
@ -30,7 +30,7 @@ where
)
}
pub fn try_recv(&self) -> Result<T, bincode::Error> {
pub fn try_recv(&self) -> Result<T, ipc::TryRecvError> {
self.ipc_receiver.try_recv()
}
@ -59,7 +59,7 @@ pub struct IpcBytesReceiver {
}
impl IpcBytesReceiver {
pub fn recv(&self) -> Result<Vec<u8>, bincode::Error> {
pub fn recv(&self) -> Result<Vec<u8>, ipc::IpcError> {
time::profile(
ProfilerCategory::IpcBytesReceiver,
None,