06-09-2011 08:59 AM
hello,
I notice a behavior with class containing wait fonction i don't expect
ie: i have to objects child of the same parent , both contain a wait ( simulating a wait for a device to respond for exemple)
when putting calcul one after other it is normale to add times
but when both object are distinct i don't understand why times are added too ...
that let think that pause fonction are dependants ...
here a vi to test , the good one is "test para 2"
Best regards
Tinnitus
06-09-2011 09:50 AM
Make it reentrant?
Ben
06-09-2011 10:17 AM
Hello,
yes it works but i don't understand why they share a common timer without make it reentrant ...
do you mean its a normal behavior ?
may be i have to create a timer object ?
Regards
Tinnitus
06-09-2011 10:24 AM
In fact it works for the little example but not in the big project where class1 is an element of other class ...
Regards
Tinnitus
06-09-2011 10:26 AM
The behaviour I described for non-re-entrant VIs I posted in my Action Engine Nugget still apply in LVOOP.
So I would say this is expected behaviour.
Ben
06-09-2011 07:08 PM
Hello Ben,
Thanks for the link,
The idea is the same except that AE is unique, with class we can have severals instances
but idea is the same
I agree with the property of non reentrant function and that a functionality i would preserve.( preventing race condition)
and making calc method reentrant break that ( the alocation of different memory space is not enable with class method )
so two calc are done in 100ms with two differents object but if i connect the same object twice in the loop this time while expecting a 200ms
(due to the protection ) it takes 100ms and that is not safe even if coding such a thing could not exist
To simplify
when 5 persons run together during 10min the trainy take 10min // parallel tasks
if they run a relay the total must be 50 min // serial tasks
and if we ask a person is to run 5 times 10 min he cannot do it in 10 min // parrallel tasks serialized due to protection
Is there a way to obtain that
i will perform others tests tomorow ...
Regards
Tinnitus