Arnold.
*/
-use core::comm::*;
+use std::task;
-type ctx = Chan<int>;
+type ctx = Sender<int>;
-fn iotask(cx: &ctx, ip: ~str) {
- assert (ip == ~"localhost");
+fn iotask(_tx: &ctx, ip: ~str) {
+ assert_eq!(ip, "localhost".to_owned());
}
pub fn main() {
- let (p, ch) = stream::<int>();
- task::spawn(|| iotask(&ch, ~"localhost") );
+ let (tx, _rx) = channel::<int>();
+ task::spawn(proc() iotask(&tx, "localhost".to_owned()) );
}