aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/microtask.rs
diff options
context:
space:
mode:
authorGregory Terzian <gterzian@users.noreply.github.com>2020-06-24 15:07:48 +0800
committerGregory Terzian <gterzian@users.noreply.github.com>2020-06-30 13:22:38 +0800
commit44ebca72da45575df4e5970e25920c46c14aa0cb (patch)
tree88a9ed7d5529b9b83425d7b7cdd9b86f18ec12c2 /components/script/microtask.rs
parent0b61cfc3ae803ac0f9deef937f890f83b24c9a35 (diff)
downloadservo-44ebca72da45575df4e5970e25920c46c14aa0cb.tar.gz
servo-44ebca72da45575df4e5970e25920c46c14aa0cb.zip
ensure clean shutdown of all threads running JS
Diffstat (limited to 'components/script/microtask.rs')
-rw-r--r--components/script/microtask.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/microtask.rs b/components/script/microtask.rs
index ae4d3c6944e..b97368fcad5 100644
--- a/components/script/microtask.rs
+++ b/components/script/microtask.rs
@@ -147,4 +147,8 @@ impl MicrotaskQueue {
pub fn empty(&self) -> bool {
self.microtask_queue.borrow().is_empty()
}
+
+ pub fn clear(&self) {
+ self.microtask_queue.borrow_mut().clear();
+ }
}