mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
deactive profiler when not in use; use newtype structs for task chans
This commit is contained in:
parent
17864cb25d
commit
c804db0f93
7 changed files with 55 additions and 92 deletions
|
@ -111,17 +111,9 @@ pub struct Reflow {
|
|||
|
||||
/// Encapsulates a channel to the layout task.
|
||||
#[deriving(Clone)]
|
||||
pub struct LayoutChan {
|
||||
chan: SharedChan<Msg>,
|
||||
}
|
||||
|
||||
pub struct LayoutChan(SharedChan<Msg>);
|
||||
impl LayoutChan {
|
||||
pub fn new(chan: Chan<Msg>) -> LayoutChan {
|
||||
LayoutChan {
|
||||
chan: SharedChan::new(chan),
|
||||
}
|
||||
}
|
||||
pub fn send(&self, msg: Msg) {
|
||||
self.chan.send(msg);
|
||||
LayoutChan(SharedChan::new(chan))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue