script: Make the resource task communication use IPC channels.

This commit is contained in:
Patrick Walton 2015-07-09 17:16:21 -07:00
parent 44d13f7fd4
commit 2aa5174246
35 changed files with 234 additions and 458 deletions

View file

@ -4,6 +4,7 @@
extern crate hyper;
use ipc_channel::ipc;
use net_traits::LoadConsumer::Channel;
use net_traits::LoadData;
use net_traits::ProgressMsg::{Payload, Done};
@ -19,7 +20,7 @@ fn assert_parse(url: &'static str,
use url::Url;
use net::data_loader::load;
let (start_chan, start_port) = channel();
let (start_chan, start_port) = ipc::channel().unwrap();
load(LoadData::new(Url::parse(url).unwrap(), None), Channel(start_chan));
let response = start_port.recv().unwrap();