Auto merge of #8545 - Ms2ger:AutoJoinScriptTask, r=pcwalton

Remove AutoJoinScriptTask.

I don't believe there is a case where it would make sense to drop the
ScriptReflow struct without joining the script thread. This approach should
be somewhat more robust, and avoids the code smell of a RAII guard in an
otherwise unused variable.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8545)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-17 01:18:45 +05:30
commit db94fda10e
2 changed files with 7 additions and 11 deletions

View file

@ -179,6 +179,12 @@ pub struct ScriptReflow {
pub query_type: ReflowQueryType,
}
impl Drop for ScriptReflow {
fn drop(&mut self) {
self.script_join_chan.send(()).unwrap();
}
}
/// Encapsulates a channel to the layout task.
#[derive(Clone)]
pub struct LayoutChan(pub Sender<Msg>);