AnsweredAssumed Answered

vrf multiple threads

Question asked by rsb on Jan 12, 2005
I have multiple threads running inside a program.  I want to run process two
ONLY after process one has finished.  I may, in fact, want to run process two
multiple times but I eventually want to run process one again.  And, I don't
want to be able to run process two while one is running.  I cant figure out how
to do this.  If I tie a thread from process one to the until break of process
two I can never get back to process one.  Any help is appreciated

**************

So you really don't want independent threads at all- you just want
two routines controlled within one program.

I'd suggest writing the two routines as functions then add
a little controlling logic to decide which to run and when.

Or- if you really want physically disconnected threads
to be logically connected then use flags. At the start of each routine
set a global variable that says that routine is running. And of
course at the front of each check to see if the other is running
by looking at the appropriate variable.

regards

Stan


--------------------------------------------------------------------------
Stan Bischof  Agilent Technologies  707-577-3994  stan_bischof@agilent.com
--------------------------------------------------------------------------

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes