From c6e8af446fa7fcd6b2362489293f2e6c5b98ffc3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 1 Feb 2013 00:27:37 -0800 Subject: [PATCH] rustdoc: Remove definitions of spawn_listener and spawn_conversation --- src/librustdoc/util.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/librustdoc/util.rs b/src/librustdoc/util.rs index 23741ed5acf..37f373504e6 100644 --- a/src/librustdoc/util.rs +++ b/src/librustdoc/util.rs @@ -21,27 +21,3 @@ pub struct NominalOp { impl NominalOp: Clone { fn clone(&self) -> NominalOp { copy *self } } - -pub fn spawn_listener( - f: fn~(oldcomm::Port)) -> oldcomm::Chan { - let setup_po = oldcomm::Port(); - let setup_ch = oldcomm::Chan(&setup_po); - do task::spawn |move f| { - let po = oldcomm::Port(); - let ch = oldcomm::Chan(&po); - oldcomm::send(setup_ch, ch); - f(move po); - } - oldcomm::recv(setup_po) -} - -pub fn spawn_conversation - (f: fn~(oldcomm::Port, oldcomm::Chan)) - -> (oldcomm::Port, oldcomm::Chan) { - let from_child = oldcomm::Port(); - let to_parent = oldcomm::Chan(&from_child); - let to_child = do spawn_listener |move f, from_parent| { - f(from_parent, to_parent) - }; - (from_child, to_child) -}