-
Process requests before continuing with script
I would like to start two data feeds in a script and wait for them to connect before continuing, like so:
h:(); .z.po:{h,:x};
system each {"q ",x," -p 0W &"} each ("feed1.q";"feed2.q");
/ in feed{1,2}.q: hopen `::<port>
while[2>count h;system"sleep 1"];
/ continue script...However, the connections aren’t accepted while the script is running, so the while loop doesn’t terminate. Is there a way to process the connection requests before continuing with the script?
And is it possible to start non-interactive q processes (like above) that don’t terminate without opening a port?
Log in to reply.