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
This commit is contained in:
Ben Blum 2012-07-24 13:03:04 -07:00
Родитель f62aadbb0c
Коммит 38845ed41f
1 изменённых файлов: 2 добавлений и 10 удалений

Просмотреть файл

@ -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<Msg>;
@ -222,16 +223,7 @@ fn destroy_surface(+surface: surface) {
#[doc = "A function for spawning into the platform's main thread"]
fn on_osmain<T: send>(+f: fn~(comm::port<T>)) -> comm::chan<T> {
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")]