Jump to content

Strange behavior of multiple notifiers


Recommended Posts

Hi guys

I have a strange problem concerning notifiers. There are two of of them. In one loop, I fire both of them sequentially. In a second loop, I am waiting for both of them sequentially. Now if the order of the waiting sequence is the same as that of the firing sequence, everything works fine. However, if I'm waiting at first for the second notifier, then for the first one, the latter waiting hangs. I'm attaching a simple VI to demonstrate it.

Is this a bug or I am missing something?

Vladimir

Link to comment

Vladimir:

If you want these notifiers to behave as two separate ones then you have to initialize them with different 'assigned names'. Else, you really have just one and the same notifier. There is an optional terminal on the create (obtain) notifier VI which you can use to name your notifier reference. Otherwise, the default name is an empty string.

This same rule apples to Queue References, Semaphores etc. Actually I think it is good practice to always name your Notifiers, Queue, or Semaphore references even if you are using just one of them.

Anthony

Link to comment

Aristos: Thanks, now I understand. I just have some more notes to this issue:

  1. Wait for All Notifications is a bit clumsy, since it returns the input notifiers and their notifications in random order - so the notifications have to be ordered after that.
  2. I think the "non-safety" of Wait on Notification should be much more stressed in the documentation. One can waste a lot of time tracking the root of such a behavior down (for me it's been a few days :throwpc: ).
  3. I vote for adding of the "safe" version of the primitive ;) .

Alukindo: Thanks for suggestion. Nevertheless, if you are creating an unnamed notifier, you get a new notifier instance with each call to Obtain Notifier.

Vladimir

Link to comment

QUOTE (Vladimir Drzik @ Apr 7 2008, 01:30 PM)

1. Wait for All Notifications is a bit clumsy, since it returns the input notifiers and their notifications in random order - so the notifications have to be ordered after that.
The order should be the same as the order of the original array.

QUOTE

2. I think the "non-safety" of Wait on Notification should be much more stressed in the documentation.

The docs have been tweaked for future versions.

QUOTE

3. I vote for adding of the "safe" version of the primitive
;)
.

R&D is not at democracy, but as a benevolent dictator, I will take your request under advisement. :-)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.