Quantcast
Channel: Cadence Technology Forums
Viewing all articles
Browse latest Browse all 62619

Forum Post: RE: How to start these jobs one after another

$
0
0
OK, first of all, newJobId++ will return 1 on the first call, not 2. It's a post increment operator which means that it returns the original value and then increments it. For step 2, ?dependency would have been 1, and so jobTable[dependency] would find jobTable[1]. It then updates the list of jobs that are dependent upon job 1. So that's how it knows - for each job id (which is just an integer) it maintains a list of dependent jobs, so that when the job finishes, it can look at that list and actually start them all. Rather than trying to understand the test code (where you can't see the values - it was there for my testing purposes), I suggest you just try doing this: procedure(finished(id status) printf("ID: %L finished\n" id) ) step1=abSubmitJob("sleep 10" ?postFunc 'finished) step2=abSubmitJob("sleep 15" ?dependency step1 ?postFunc 'finished) step3=abSubmitJob("sleep 5" ?dependency step2 ?postFunc 'finished) Then you can look at the values of step1, step2, step3 etc. Regards, Andrew.

Viewing all articles
Browse latest Browse all 62619

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>