Open randall-coding opened 1 year ago
Before:
let ctx = upgrade(&conn.context())?;
let ctx = ctx.lock().unwrap();
let root = get_object!(ctx, &S::validate("").unwrap(), Root)?;
let root = upgrade(&root)?;
std::mem::drop(ctx);
After:
let ctx = upgrade(&conn.context())?;
// let ctx = ctx.lock().unwrap();
let root = get_object!(ctx.lock().unwrap(), &S::validate("").unwrap(), Root)?;
let root = upgrade(&root)?;
// std::mem::drop(ctx);
and work fine!
Conditions: I'm running playwright (dev branch) in two parallel threads like so:
Error: Compilation error occurs saying Playwright is not Send.
Diagnosis: I was able to narrow it down to this line of code
std::mem::drop(ctx);
in imp/playwright.rsPartial Solution: After removing that line of code it will compile :+1: . However, though playwright works, it will hang indefinitely after I close the browser window and I have to kill the program manually. I'm not 100% sure it is from removing that line or not yet, but it seems likely.