11-10-2008 07:04 PM
My project is using locals because we have multiple parallel loops and
also have multiple controls (different ways of interpreting the meaning
of a control) for the same value.
I'm still in the process of trying to absorb the subtleties of using
locals vs. using property nodes from the help files and the
veritable plethora of threads on the subject here. As I understand it,
as long as I have proper data flow between a read local and its
corresponding write local, there will be no race condition. Is this correct?
For example (sorry, too lazy to make a screen shot)
[read local] --->(code to modify value)--->[write local]
So, only a race condition if my read and write have no data
flow between them right?
[read local] --->(some code)
(other code) ---> [write local]
Do I understand this correctly?
Thanks and Best Regards,
J.
11-10-2008 07:16 PM
JeffBuckles wrote:Do I understand this correctly?
Yes.
However, since you have parallel loops you might get a race condition between the two loops.
JeffBuckles wrote:I'm still in the process of trying to absorb the subtleties of using
locals vs. using property nodes from the help files and the
veritable plethora of threads on the subject here.
Locals and value property nodes (and global and shared variables) all have the same potential for race conditions.
Property nodes are synchronous and thus more expensive than local variables.
11-11-2008 08:12 AM
Ditto Christian's comments.
My Nugget on Action Engines may be helpful with handling race conditions.
Take care,
Ben