Merge branch 'main' into polish-project-diagnostics

Also fix false failure in ModelHandle::condition when parking is not forbidden.
This commit is contained in:
Max Brunsfeld 2022-01-05 10:53:18 -08:00
commit 8728d3292d
16 changed files with 676 additions and 202 deletions

View file

@ -2660,6 +2660,8 @@ impl<T: Entity> ModelHandle<T> {
loop {
{
let cx = cx.borrow();
let executor = cx.foreground();
let cx = cx.as_ref();
if predicate(
handle
@ -2670,10 +2672,10 @@ impl<T: Entity> ModelHandle<T> {
) {
break;
}
}
if cx.borrow_mut().foreground().would_park() {
panic!("parked while waiting on condition");
if executor.parking_forbidden() && executor.would_park() {
panic!("parked while waiting on condition");
}
}
rx.recv()