introduced "protected" threads so we can kill dependencies in an appropriate order
docs for spawn_managed_thread