Blitz bug report: DioxusLabs/blitz#430
Reproduction repo: https://github.com/ealmloff/blitz-stylo-race
Uses style_config::set_pref!("layout.threads", -1);. Setting that to 0 or 1 seems to prevent the panics (not tested thoroughly).
use blitz_dom::{Document as _, DocumentConfig};
use blitz_html::HtmlDocument;
use std::thread;
fn main() {
let html = "<div></div>".repeat(64);
let handles: Vec<_> = (0..16)
.map(|_| {
let html = html.clone();
thread::spawn(move || {
for _ in 0..1000 {
HtmlDocument::from_html(&html, DocumentConfig::default())
.inner_mut()
.resolve(0.0);
}
})
})
.collect();
for h in handles {
h.join().expect("a worker thread panicked");
}
}
Blitz bug report: DioxusLabs/blitz#430
Reproduction repo: https://github.com/ealmloff/blitz-stylo-race
Uses
style_config::set_pref!("layout.threads", -1);. Setting that to 0 or 1 seems to prevent the panics (not tested thoroughly).