mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Work around broken TaskBuilder.
This commit is contained in:
parent
5324cabbf8
commit
11467e21bb
2 changed files with 8 additions and 2 deletions
|
@ -288,7 +288,10 @@ fn Surface(backend: BackendType) -> Surface {
|
||||||
/// A function for spawning into the platform's main thread.
|
/// A function for spawning into the platform's main thread.
|
||||||
fn on_osmain<T: Owned>(f: ~fn(po: Port<T>)) -> Chan<T> {
|
fn on_osmain<T: Owned>(f: ~fn(po: Port<T>)) -> Chan<T> {
|
||||||
let (setup_po, setup_ch) = comm::stream();
|
let (setup_po, setup_ch) = comm::stream();
|
||||||
do task::task().sched_mode(task::PlatformThread).spawn {
|
// FIXME: rust#6399
|
||||||
|
let mut main_task = task::task();
|
||||||
|
main_task.sched_mode(task::PlatformThread);
|
||||||
|
do main_task.spawn {
|
||||||
let (po, ch) = comm::stream();
|
let (po, ch) = comm::stream();
|
||||||
setup_ch.send(ch);
|
setup_ch.send(ch);
|
||||||
f(po);
|
f(po);
|
||||||
|
|
|
@ -65,7 +65,10 @@ pub fn ContentTask(layout_task: LayoutTask,
|
||||||
let dom_event_port = Cell(dom_event_port);
|
let dom_event_port = Cell(dom_event_port);
|
||||||
let dom_event_chan = Cell(dom_event_chan);
|
let dom_event_chan = Cell(dom_event_chan);
|
||||||
|
|
||||||
do task().sched_mode(SingleThreaded).spawn {
|
// FIXME: rust#6399
|
||||||
|
let mut the_task = task();
|
||||||
|
the_task.sched_mode(SingleThreaded);
|
||||||
|
do the_task.spawn {
|
||||||
let content = Content(layout_task.clone(),
|
let content = Content(layout_task.clone(),
|
||||||
control_port.take(),
|
control_port.take(),
|
||||||
control_chan_copy.clone(),
|
control_chan_copy.clone(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue