Re: synchronisation between two executable



On Thu, 5 Mar 2009 04:38:41 -0800 (PST), rudra <bnrj.rudra@xxxxxxxxx>
wrote:

i have two executable to run simultaneously(say a.out and b.out) i
cant make subroutine just for now. the plan is something like:
i. b.out runs first and generates some output.
ii. this output works as the input of a.out, and again creates input
for b.out.
and this goes on in a loop.

i have a idea of how much time b.out can take, and until now i make
a.out to sleep until b.out creats the file, which is worst way of
doing it.
can anybody suggest me a better idea to make it?

Why do they have to run simultaneously ?

If I understood correctly, B runs first and generates some output,
then A runs and uses that output, to generate some more output. Then B
runs again, and uses output of A as an input.

Why not use a batch file for just putting them in a loop ? What is the
stopping condition ?

-- Luka
.



Relevant Pages