mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
net: Use a thread for each AsyncResponseTarget
to avoid having to send
trait objects across process boundaries.
This commit is contained in:
parent
9c9d7dc93b
commit
44d13f7fd4
10 changed files with 78 additions and 31 deletions
|
@ -283,7 +283,7 @@ pub trait DocumentHelpers<'a> {
|
|||
/// https://w3c.github.io/animation-timing/#dfn-invoke-callbacks-algorithm
|
||||
fn invoke_animation_callbacks(self);
|
||||
fn prepare_async_load(self, load: LoadType) -> PendingAsyncLoad;
|
||||
fn load_async(self, load: LoadType, listener: Box<AsyncResponseTarget + Send>);
|
||||
fn load_async(self, load: LoadType, listener: AsyncResponseTarget);
|
||||
fn load_sync(self, load: LoadType) -> Result<(Metadata, Vec<u8>), String>;
|
||||
fn finish_load(self, load: LoadType);
|
||||
fn set_current_parser(self, script: Option<&ServoHTMLParser>);
|
||||
|
@ -968,7 +968,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
|
|||
loader.prepare_async_load(load)
|
||||
}
|
||||
|
||||
fn load_async(self, load: LoadType, listener: Box<AsyncResponseTarget + Send>) {
|
||||
fn load_async(self, load: LoadType, listener: AsyncResponseTarget) {
|
||||
let mut loader = self.loader.borrow_mut();
|
||||
loader.load_async(load, listener)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue