MirrorMaestro is a decoration on ServiceContext, responsible for mirroring read operations received on the primary. Reads are mirroring via a ThreadPoolTaskExecutor, that internally uses a ThreadPool to run the mirroring operation in the background and off of the critical execution path.
As part of shutting down a mongod server, we shutdown this service from here. The shutdown task, however, doesn't join the executor threads. We should join the executor threads to make sure they all return before process shutdown.