pub(crate) struct TaskManager {
sender: RefCell<Option<ScriptEventLoopSender>>,
pipeline_id: PipelineId,
cancellers: TaskCancellers,
}
Fields§
§sender: RefCell<Option<ScriptEventLoopSender>>
§pipeline_id: PipelineId
§cancellers: TaskCancellers
Implementations§
Source§impl TaskManager
impl TaskManager
pub(crate) fn new( sender: Option<ScriptEventLoopSender>, pipeline_id: PipelineId, shared_canceller: Option<TaskCanceller>, ) -> Self
pub(crate) fn pipeline_id(&self) -> PipelineId
pub(crate) fn sender(&self) -> Ref<'_, Option<ScriptEventLoopSender>>
pub(crate) fn canceller(&self, name: TaskSourceName) -> TaskCanceller
Sourcepub(crate) fn set_sender(&self, sender: Option<ScriptEventLoopSender>)
pub(crate) fn set_sender(&self, sender: Option<ScriptEventLoopSender>)
Update the sender for this TaskSource
. This is used by dedicated workers, which only have a
sender while handling messages (as their sender prevents the main thread Worker object from being
garbage collected).
Sourcepub(crate) fn cancel_all_tasks_and_ignore_future_tasks(&self)
pub(crate) fn cancel_all_tasks_and_ignore_future_tasks(&self)
Cancel all queued but unexecuted tasks and ignore all subsequently queued tasks.
Sourcepub(crate) fn cancel_pending_tasks_for_source(
&self,
task_source_name: TaskSourceName,
)
pub(crate) fn cancel_pending_tasks_for_source( &self, task_source_name: TaskSourceName, )
Cancel all queued but unexecuted tasks for the given task source, but subsequently queued tasks will not be ignored.
pub(crate) fn bitmap_task_source(&self) -> TaskSource<'_>
pub(crate) fn canvas_blob_task_source(&self) -> TaskSource<'_>
pub(crate) fn clipboard_task_source(&self) -> TaskSource<'_>
pub(crate) fn database_access_task_source(&self) -> TaskSource<'_>
pub(crate) fn dom_manipulation_task_source(&self) -> TaskSource<'_>
pub(crate) fn file_reading_task_source(&self) -> TaskSource<'_>
pub(crate) fn font_loading_task_source(&self) -> TaskSource<'_>
pub(crate) fn gamepad_task_source(&self) -> TaskSource<'_>
pub(crate) fn media_element_task_source(&self) -> TaskSource<'_>
pub(crate) fn networking_task_source(&self) -> TaskSource<'_>
pub(crate) fn performance_timeline_task_source(&self) -> TaskSource<'_>
pub(crate) fn port_message_queue(&self) -> TaskSource<'_>
pub(crate) fn remote_event_task_source(&self) -> TaskSource<'_>
pub(crate) fn timer_task_source(&self) -> TaskSource<'_>
pub(crate) fn user_interaction_task_source(&self) -> TaskSource<'_>
pub(crate) fn websocket_task_source(&self) -> TaskSource<'_>
pub(crate) fn intersection_observer_task_source(&self) -> TaskSource<'_>
pub(crate) fn webgpu_task_source(&self) -> TaskSource<'_>
Trait Implementations§
Source§impl MallocSizeOf for TaskManager
impl MallocSizeOf for TaskManager
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl !Freeze for TaskManager
impl !RefUnwindSafe for TaskManager
impl Send for TaskManager
impl !Sync for TaskManager
impl Unpin for TaskManager
impl !UnwindSafe for TaskManager
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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