Add spawn_conversation

This commit is contained in:
Jesse Ruderman
2012-08-08 16:38:26 -04:00
parent 166cb1b28b
commit a76e4334b3
5 changed files with 67 additions and 51 deletions

View File

@@ -29,9 +29,8 @@ fn run(
return doc;
}
let result_port = comm::port();
let result_chan = comm::chan(result_port);
let page_chan = do task::spawn_listener |page_port| {
let (result_port, page_chan) = do task::spawn_conversation
|page_port, result_chan| {
comm::send(result_chan, make_doc_from_pages(page_port));
};