AnsweredAssumed Answered

vrf Strange Thread Flow Example.vee

Question asked by VRFuser on May 21, 2003
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45"><TITLE>Re: [vrf] Strange Thread Flow Example.vee</TITLE></HEAD><BODY><P><FONT SIZE=2>I took the habit over the time to put a 1mS delay at the beginning of each parallel thread I create to avoid this kind of problem that were happening some times.</FONT></P><P><FONT SIZE=2>-----Message d'origine-----</FONT><BR><FONT SIZE=2>De: HILTON,GRAEME (A-England,ex1) [<A HREF="mailto:graeme_hilton@agilent.com">mailto:graeme_hilton@agilent.com</A>]</FONT><BR><FONT SIZE=2>Date: 16 mai 2003 11:52</FONT></P><P><FONT SIZE=2>Hi Barrie,</FONT><BR><FONT SIZE=2>You could try have a Main with only two userobjects.  The first contains your initialisation routines and the second, the rest of the program.</FONT></P><BR><P><FONT SIZE=2>-----Original Message-----</FONT><BR><FONT SIZE=2>From: Barrie Walden [<A HREF="mailto:bwalden@whoi.edu">mailto:bwalden@whoi.edu</A>]</FONT><BR><FONT SIZE=2>Sent: 16 May 2003 16:43</FONT></P><P><FONT SIZE=2>I use a lot of independent threads and routinely have variable</FONT><BR><FONT SIZE=2>initialization problems due to the order in which they start.  Initially</FONT><BR><FONT SIZE=2>I tried using the left-right, top-bottom position technique but had</FONT><BR><FONT SIZE=2>enough self imposed difficulties to cause me to switch over to an</FONT><BR><FONT SIZE=2>"initialization flag" with associated test code at the beginning of each</FONT><BR><FONT SIZE=2>thread.  Even this wasn't enough - now I precede the test code with a</FONT><BR><FONT SIZE=2>delay to make sure the initialization flag has been set.  It would be</FONT><BR><FONT SIZE=2>nice to have a means for forcing a particular thread to run first and to</FONT><BR><FONT SIZE=2>completion before any other threads start.</FONT></P><BR><P><FONT SIZE=2>-----Message d'origine-----</FONT><BR><FONT SIZE=2>De: Andrew Fudge [<A HREF="mailto:AndrewF@genesysibs.com">mailto:AndrewF@genesysibs.com</A>]</FONT><BR><FONT SIZE=2>Date: 16 mai 2003 04:34</FONT></P><P><FONT SIZE=2>I have noticed some strange thread flow behaviour.  If anyone is bored you can play with this.</FONT></P><P><FONT SIZE=2>Step through this program and you can see that "UserFunction2" holds up execution of all other threads.  Nothing else can run.</FONT></P><P><FONT SIZE=2>However, if "UserFunction2" sequence input pin is connected to the "Delay" or "Until Break" objects, all threads run as expected.</FONT></P><P><FONT SIZE=2>Could anyone at Agilent explain this behaviour.  Are there any priorities on which thread runs first?</FONT></P><P><FONT SIZE=2>Strange...</FONT></P>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@it.lists.it.agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></HTML>  

Outcomes