08-24-2009 12:33 PM
I would like to use the new data value reference capability in lv9, and use it with the in-place element structure. However, I am concerned about the implementation--i.e., the way ni has made the use of these pointers "safe". The instrumentation newsletter says that when you send a data value reference to an in-place element structure, "...Entrance to the structure blocks the execution of any other in place element structures throughout your application." The implication is that execution of all in-place element structures is shut down until you fully complete and exit the in-place element structure to which you sent the reference. Do I understand this correctly?
If so, is this a potential problem for performance? For programmers who use the in-place element structure extensively, it sounds like the use of one data value reference could create a nasty bottleneck. If you have a lengthy in-place calculation on a data value reference, you could block every other in-place element structure running in labview for the duration of the calculation. This sounds like a problem to me, especially if you use the in-place element structure a lot (as I do) for mundane cluster unbundling, etc. Also, does this shut-down of in-place element structures extend beyond the vi with the reference to include all vis that are currently running on labview? I would guess that it would have to. Does it interfere with attempts to parallelize your code(i.e., if you have multiple loops that would be running in different threads, except that they're all shut down by the data value reference call)? Again, I would guess it would have to.
If my understanding of this is correct, is there a better way to implement this? Does it really require a lock on execution of every other in-place element structure throughout your entire application?
Comments/corrections/soothing of my paranoia welcome,
Eric
08-24-2009 12:52 PM