From 38845ed41f810542908f5677ea8ca3d1c24043c2 Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Tue, 24 Jul 2012 13:03:04 -0700 Subject: [PATCH] servo: Merge #33 - servo/platform/osmain.rs: Change to new task_builder (from bblum:master) Source-Repo: https://github.com/servo/servo Source-Revision: f7a5a50145f69af19dd04caaea5f4d03c5cacb5e --- servo/src/servo/platform/osmain.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/servo/src/servo/platform/osmain.rs b/servo/src/servo/platform/osmain.rs index b8839b906908..99cb70179ecb 100644 --- a/servo/src/servo/platform/osmain.rs +++ b/servo/src/servo/platform/osmain.rs @@ -13,6 +13,7 @@ import dom::event::{Event, ResizeEvent}; import layers::ImageLayer; import geom::size::Size2D; import std::cmp::fuzzy_eq; +import task::task_builder; import vec::push; type OSMain = chan; @@ -222,16 +223,7 @@ fn destroy_surface(+surface: surface) { #[doc = "A function for spawning into the platform's main thread"] fn on_osmain(+f: fn~(comm::port)) -> comm::chan { - let builder = task::builder(); - let opts = { - sched: some({ - mode: task::osmain, - foreign_stack_size: none - }) - with task::get_opts(builder) - }; - task::set_opts(builder, opts); - ret task::run_listener(builder, f); + task::task().sched_mode(task::osmain).spawn_listener(f) } // #[cfg(target_os = "linux")]