Skip to content

Commit

Permalink
Auto merge of #135 - jdm:headless-main-thread, r=Manishearth
Browse files Browse the repository at this point in the history
Run headless device on its own thread.

We really want to stop using the main thread code path as much as possible, and it avoids timeouts in servo/servo#25837 when the main thread blocks in other parts of the pipeline and never ends up processing the pending XR events.
  • Loading branch information
bors-servo committed Mar 6, 2020
2 parents 3ac3e83 + f9689a7 commit bf3d92b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webxr/headless/mod.rs
Expand Up @@ -132,7 +132,7 @@ impl DiscoveryAPI<SwapChains> for HeadlessDiscovery {
let data = self.data.clone();
let clip_planes = Default::default();
let granted_features = init.validate(mode, &data.lock().unwrap().supported_features)?;
xr.run_on_main_thread(move || {
xr.spawn(move || {
Ok(HeadlessDevice {
data,
mode,
Expand Down

0 comments on commit bf3d92b

Please sign in to comment.