In #7423, we found that spawn_cpu() could cause deadlocks on low-cpu systems when used improperly. We need to write out some rules for when it should be used, which is basically:
- No channels
- No IO
- No locks
(It should just consume CPU and finish, never waiting on anything else.)
There might be other places where we have similar issues, so we should audit all call sites for this.
In #7423, we found that
spawn_cpu()could cause deadlocks on low-cpu systems when used improperly. We need to write out some rules for when it should be used, which is basically:(It should just consume CPU and finish, never waiting on anything else.)
There might be other places where we have similar issues, so we should audit all call sites for this.