Is this thread-safe? This seems to access a bunch of internal DAGScheduler data-structures that are not synchronized. We might need to think a bit about how to exposes access to these without hurting performance.