We recently added #795 , after merging it I realized that we should add a test around thread safety.
Test thread safety with concurrent get_available() and done() calls in https://github.com/python-wheel-build/fromager/blob/main/tests/test_dependency_graph.py. TrackingTopologicalSorter(graph) should work correctly with multiple threads.