mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make Task require Send
This commit is contained in:
parent
8000efac75
commit
f088b708c9
10 changed files with 25 additions and 21 deletions
|
@ -645,8 +645,9 @@ impl WorkletThread {
|
|||
}
|
||||
|
||||
/// Run a task in the main script thread.
|
||||
fn run_in_script_thread<T>(&self, task: T) where
|
||||
T: 'static + Send + Task,
|
||||
fn run_in_script_thread<T>(&self, task: T)
|
||||
where
|
||||
T: Task + 'static,
|
||||
{
|
||||
let msg = CommonScriptMsg::Task(ScriptThreadEventCategory::WorkletEvent, box task);
|
||||
let msg = MainThreadScriptMsg::Common(msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue