I noticed the Boost doc for dijkstra_shortest_paths() says that the algorithm terminates when the priority queue is empty, which implies visiting every vertex, which is not necessary to find the shortest path between two vertices.
I would like to use the algorithm to find the shortest path to a known vertex, which means stopping it before the queue is empty. At what point can I (the library client) decide to end a BFS search?