The current ::stop() implementation was not thread safe and we should queue the ::stop() for the next loop iteration so even if we call ::stop() before ::run(), it gets processed.
The current ::stop() implementation was not thread safe and we should queue the ::stop() for the next loop iteration so even if we call ::stop() before ::run(), it gets processed.