mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
add mechanism to join on service- and dedicated-worker threads
This commit is contained in:
parent
d7d56454b0
commit
ed688fe2c1
6 changed files with 63 additions and 18 deletions
|
@ -56,7 +56,7 @@ use servo_url::ServoUrl;
|
|||
use std::mem::replace;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
use std::thread;
|
||||
use std::thread::{self, JoinHandle};
|
||||
use style::thread_state::{self, ThreadState};
|
||||
|
||||
/// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
|
||||
|
@ -299,7 +299,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
image_cache: Arc<dyn ImageCache>,
|
||||
browsing_context: Option<BrowsingContextId>,
|
||||
gpu_id_hub: Arc<Mutex<Identities>>,
|
||||
) {
|
||||
) -> JoinHandle<()> {
|
||||
let serialized_worker_url = worker_url.to_string();
|
||||
let name = format!("WebWorker for {}", serialized_worker_url);
|
||||
let top_level_browsing_context_id = TopLevelBrowsingContextId::installed();
|
||||
|
@ -435,7 +435,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
CommonScriptMsg::CollectReports,
|
||||
);
|
||||
})
|
||||
.expect("Thread spawning failed");
|
||||
.expect("Thread spawning failed")
|
||||
}
|
||||
|
||||
pub fn image_cache(&self) -> Arc<dyn ImageCache> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue