how can `dagSchedulerActorSupervisor` possibly be null here? Busy-waiting here is also not ideal, it would be better to use proper synchronization.

I think the issue is that actors in general are supposed to be self-contained, but here inside of an actor we're setting global state. I'm not following this patch closely enough to understand why it's necessary, but it does seem a bit ugly.