mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Make all task source runnables cancellable
Implement all Runnable methods on CancellableRunnable to redirect to their inner runnable
This commit is contained in:
parent
afc0ccb48d
commit
5f7324a9a5
14 changed files with 69 additions and 58 deletions
|
@ -8,8 +8,10 @@ pub mod history_traversal;
|
|||
pub mod networking;
|
||||
pub mod user_interaction;
|
||||
|
||||
use dom::window::Window;
|
||||
use script_thread::Runnable;
|
||||
use std::result::Result;
|
||||
|
||||
pub trait TaskSource<T> {
|
||||
fn queue(&self, msg: T) -> Result<(), ()>;
|
||||
pub trait TaskSource {
|
||||
fn queue<T: Runnable + Send + 'static>(&self, msg: T, window: &Window) -> Result<(), ()>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue