There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Follow the chain. Both loops are going to stop after one itteration. Everything is using the same notifier refnum. Since the timeouts are -1, they will wait indefinately until they recieve the notification.
Top loop will wait until it recieves the notification from the bottom loop. Once it recieves the notification, it increments and send it back to the bottom loop, which is now waiting.
Just ran it for the first time. Highlight execution shows what is happening.
Key thought: Notifiers are broadcast. So all reads will get the latest value. Therefore we hae a race condition and the bottom read will most likely get the 0 that was written by the bottom loop. But this is a race condition and there is a chance that the bottom loop will "freeze" long enough for the top loop to send the notification and overwrite the first sent notification.
So you could get B or C.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Crossrulz beat me to it. I had pulled up the page but got distracted here at work before I could respond. Yes, there is a race condition. B or C.
Not sure if everyone knows, as I just found out recently - all the screenshots Steve posts are VI Snippets, as shown by the icons in the upper left of the diagram. You create them by going Edit-Create VI Snippet from Selection. The main advantage to this is you can click and drag this to your blank VI block diagram and it will create everything in the picture. Awesome feature to save time and make sure it is correct when trying to understand these questions.
Answer: B and/or C. Thanks crossrulz. Nice comment about VI Snippets MrStevenUND. I know there is a post waaay back in the blog where I mention that most of the posts are snippets but its probably 3 years old by now.
When the bottom loop Send Notification function sends a notification, is that notification only used once or could both Wait on Notification functions receive the same send notification? For some reason I thought that one Send Notification function would be sent to all the Wait on Notification functions (and can be used more than once), which would only make it B. Please clarify.
Both could use it. But the bottom loop could "freeze" long enough for the top loop to send a new notification before the bottom loop is able to read the previous notification. In that case, you will get C. Weird things can happen when you do things in parallel.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5