pub(crate) struct FetchThread {
pub(crate) active_fetches: FxHashMap<RequestId, BoxedFetchCallback>,
pub(crate) receiver: Receiver<ToFetchThreadMessage>,
pub(crate) to_fetch_sender: IpcSender<FetchResponseMsg>,
}Expand description
A thread to handle fetches in a Servo process. This thread is responsible for listening for new fetch requests as well as updates on those operations and forwarding them to crossbeam channels.
Fields§
§active_fetches: FxHashMap<RequestId, BoxedFetchCallback>A list of active fetches. A fetch is no longer active once the
FetchResponseMsg::ProcessResponseEOF is received.
receiver: Receiver<ToFetchThreadMessage>A crossbeam receiver attached to the router proxy which converts incoming fetch updates from IPC messages to crossbeam messages as well as another sender which handles requests from clients wanting to do fetches.
to_fetch_sender: IpcSender<FetchResponseMsg>An IpcSender that’s sent with every fetch request and leads back to our
router proxy.
Implementations§
Source§impl FetchThread
impl FetchThread
pub(crate) fn spawn() -> (Sender<ToFetchThreadMessage>, JoinHandle<()>)
pub(crate) fn run(&mut self)
Auto Trait Implementations§
impl Freeze for FetchThread
impl !RefUnwindSafe for FetchThread
impl Send for FetchThread
impl !Sync for FetchThread
impl Unpin for FetchThread
impl !UnwindSafe for FetchThread
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert