stop the simulation as soon as no messages are pending