deactive profiler when not in use; use newtype structs for task chans

This commit is contained in:
Tim Kuehn 2013-09-19 21:29:23 -04:00
parent 17864cb25d
commit c804db0f93
7 changed files with 55 additions and 92 deletions

View file

@ -59,19 +59,12 @@ pub fn BufferRequest(screen_rect: Rect<uint>, page_rect: Rect<f32>) -> BufferReq
}
#[deriving(Clone)]
pub struct RenderChan<T> {
chan: SharedChan<Msg<T>>,
}
pub struct RenderChan<T>{chan:SharedChan<Msg<T>>}
impl<T> RenderChan<T> {
pub fn new(chan: Chan<Msg<T>>) -> RenderChan<T> {
RenderChan {
chan: SharedChan::new(chan),
}
}
pub fn send(&self, msg: Msg<T>) {
self.chan.send(msg);
RenderChan{chan:SharedChan::new(chan)}
}
pub fn send(&self, msg: Msg<T>) { self.chan.send(msg) }
}
struct RenderTask<C,T> {