10-30-2019 10:54 AM
@crossrulz wrote:
@Mark_Yedinak wrote:
External to the loop with the Wait on Notification, you will need to destroy the notifier. In your UI loop that is monitoring the Stop button it should release the notifier after it has detected the stop. Your consumer loop will get an error on the notifier. This will be your indication to stop that loop.
If it was a Queue, I would be screaming at you. If you want to process all of the data, then you need to send a sentinel of some sort through the queue to tell the consumer loop to stop (destroying the queue would destroy any data that has not yet been processed). But since we are dealing with a Notifier, it is safe to assume we only care about the latest received data.
This is true.