Description
If one thread starts a broker and a second tries to stop we can get in a mess. Particularly if there is blocking or locking in the mix. In some cases we are ok but there is no determinism.
In a simple case, the stop can complete before the start gets going at all and we miss the stop, leaving a dangling broker.