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.
This commit is contained in:
Ms2ger 2015-11-16 12:41:25 +01:00
parent 0293aa2e52
commit a2c08413dd
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>);