Auto merge of #6482 - Ms2ger:thunk, r=metajack

Stop using the deprecated Thunk API.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6482)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-06-26 17:10:40 -06:00
commit f0dd71418e
2 changed files with 3 additions and 4 deletions

View file

@ -16,7 +16,6 @@
#![feature(slice_extras)]
#![feature(step_by)]
#![feature(step_trait)]
#![feature(thunk)]
#![feature(zero_one)]
#![plugin(string_cache_plugin)]

View file

@ -16,12 +16,12 @@
//
use task::spawn_named;
use std::boxed::FnBox;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::{channel, Sender, Receiver};
use std::thunk::Thunk;
pub struct TaskPool {
tx: Sender<Thunk<'static, ()>>,
tx: Sender<Box<FnBox() + Send + 'static>>,
}
impl TaskPool {
@ -40,7 +40,7 @@ impl TaskPool {
return TaskPool { tx: tx };
fn worker(rx: &Mutex<Receiver<Thunk<()>>>) {
fn worker(rx: &Mutex<Receiver<Box<FnBox() + Send + 'static>>>) {
loop {
let job = rx.lock().unwrap().recv();
match job {