Home › Forums › kdb+ › Process requests before continuing with script › Reply To: Process requests before continuing with script
-
You can use a timer and wrap the rest of the code in a function.
h:(); .z.po:{h,:x};
{system "q ",x," -p 0W &"} each ("feed1.q";"feed2.q");
.z.ts:{if[2=count h;system"t 0";main[]]}
\t 1000
main:{[] show "Rest of code" }Or move the code out to a different file and only load that once the handles are open:
h:(); .z.po:{h,:x};
{system "q ",x," -p 0W &"} each ("feed1.q";"feed2.q");
.z.ts:{if[2=count h;system"t 0";system"l main.q"]}
\t 1000