The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Notifiers .... notifiers .... everywhere

SercoSteveB
Active Participant

What are the contents of String Array Out following execution of the VI?

 

NOTE:  Multiple answers may apply.

 

Multiple Notifiers.png

 

Multiple Notifiers Answers.png

Comments
nik35324
Member

A B C D.

Notifiers are lossy, single element and broadcasting. Used to display data which are not time critical for eg. charts & graphsasin QMH template.

simonj69
Member

ABC or D

Timsrice
Member

A, or B, or C

I think the response is in 'build array' order, so I don't think D would occur.

(Please correct me if my understanding is wrong)

MrStevenUND
Member

a, b, c, d.  

All are possible because we don't know the order of execution (race condition)

crossrulz
Knight of NI

All


GCentral
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
Matt-A.
Member

All.  Interesting.  I am wondering about Tim's question.  So reading the Wait on Notification from Muliple indicates this snippet could cause deadlock.  If possible, the Wait...with Notifier History function would be the better choice. 

ABCMan
Member

Can someone explain how C and D can be answers?  Wouldn't stop on True prevent the first loop getting to the second notifier?  

Timsrice
Member

'Wait on notification from multiple' will fire when one of the notifiers receives a message.  It will then supply an array of all the current notifications.  On some occasions the other notifier has squeezed in before the 'Wait...' actually fires.
In this case there are two notifications.

 

Race condition

All loops execute just once

Sometimes both notifiers will have a message

SercoSteveB
Active Participant

Answer: A, B, C & D.  Nice one all.    The order of execution of the WHILE Loops is the key here as covered by MrStevenUND and Timsrice.

Akhil_shah
Member

I tried this and my answer is A. Can someone explain how All will be the answer?

crossrulz
Knight of NI

You have a race condition in that fact that you cannot guarantee which notifications will be sent and in what order before the Wait On Multiple Notifications is called.


GCentral
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