mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
Add name method to Runnable trait
This commit is contained in:
parent
d6f4dc06df
commit
54cf3afe30
2 changed files with 3 additions and 0 deletions
|
@ -200,6 +200,7 @@ impl<T: Runnable + Send> Runnable for CancellableRunnable<T> {
|
|||
|
||||
pub trait Runnable {
|
||||
fn is_cancelled(&self) -> bool { false }
|
||||
fn name(&self) -> &'static str { "generic runnable" }
|
||||
fn handler(self: Box<Self>) {}
|
||||
fn main_thread_handler(self: Box<Self>, _script_thread: &ScriptThread) { self.handler(); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue