mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make Task require Send
This commit is contained in:
parent
8000efac75
commit
f088b708c9
10 changed files with 25 additions and 21 deletions
|
@ -32,7 +32,7 @@ impl TaskSource for DOMManipulationTaskSource {
|
|||
canceller: &TaskCanceller,
|
||||
) -> Result<(), ()>
|
||||
where
|
||||
T: Task + Send + 'static,
|
||||
T: Task + 'static,
|
||||
{
|
||||
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::ScriptEvent,
|
||||
|
|
|
@ -25,7 +25,7 @@ impl TaskSource for FileReadingTaskSource {
|
|||
canceller: &TaskCanceller,
|
||||
) -> Result<(), ()>
|
||||
where
|
||||
T: Send + Task + 'static,
|
||||
T: Task + 'static,
|
||||
{
|
||||
self.0.send(CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::FileRead,
|
||||
|
|
|
@ -20,9 +20,12 @@ pub trait TaskSource {
|
|||
canceller: &TaskCanceller,
|
||||
) -> Result<(), ()>
|
||||
where
|
||||
T: Send + Task + 'static;
|
||||
T: Task + 'static;
|
||||
|
||||
fn queue<T: Task + Send + 'static>(&self, msg: Box<T>, global: &GlobalScope) -> Result<(), ()> {
|
||||
fn queue<T>(&self, msg: Box<T>, global: &GlobalScope) -> Result<(), ()>
|
||||
where
|
||||
T: Task + 'static,
|
||||
{
|
||||
self.queue_with_canceller(msg, &global.task_canceller())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ impl TaskSource for NetworkingTaskSource {
|
|||
canceller: &TaskCanceller,
|
||||
) -> Result<(), ()>
|
||||
where
|
||||
T: Send + Task + 'static,
|
||||
T: Task + 'static,
|
||||
{
|
||||
self.0.send(CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::NetworkEvent,
|
||||
|
@ -36,7 +36,7 @@ impl NetworkingTaskSource {
|
|||
/// global scope gets destroyed.
|
||||
pub fn queue_unconditionally<T>(&self, msg: Box<T>) -> Result<(), ()>
|
||||
where
|
||||
T: Task + Send + 'static,
|
||||
T: Task + 'static,
|
||||
{
|
||||
self.0.send(CommonScriptMsg::Task(ScriptThreadEventCategory::NetworkEvent, msg))
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ impl TaskSource for PerformanceTimelineTaskSource {
|
|||
canceller: &TaskCanceller,
|
||||
) -> Result<(), ()>
|
||||
where
|
||||
T: Send + Task + 'static,
|
||||
T: Task + 'static,
|
||||
{
|
||||
let msg = CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::PerformanceTimelineTask,
|
||||
|
|
|
@ -32,7 +32,7 @@ impl TaskSource for UserInteractionTaskSource {
|
|||
canceller: &TaskCanceller,
|
||||
) -> Result<(), ()>
|
||||
where
|
||||
T: Task + Send + 'static,
|
||||
T: Task + 'static,
|
||||
{
|
||||
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::InputEvent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue