In my Windows batch scripts I have often had the need to do parallel execution of a number of lengthy child-programs and then (in the same script) wait for them to finish before continue with the next steps in my batch. Especially on modern machines with lots of CPU cores. The main reason for me to do this is to speed up my build-scripts by utilizing multiple CPU cores in parallel. The problem, though, has been that there is no easy and simple way to achieve this in standard Windows batch scripts.
I was hoping to find something I could use to do it with TCC, but as far as I can see there is no such support. So I spent some time googling around until I found a nice little alternative Windows shell called "Yori". Yori is open source and can be downloaded from here. It makes it easy to implement parallel process execution and wait for them to finish. In essence, what you need to do is to start the different sub-processes as so-called "jobs" and then use the internal command "wait" to wait for them to finish. You can start any process as a job by adding the special characters "&!" at the end of the command. Something like this:
ping localhost &!
ping someotherhost &!
wait
I suggest you add something similar (and probably much better and more flexible) to the set of internal commands of TCC. Some kind of "job management and registry" and a set of internal commands to work with it. Any chance to see it in the "near" future?
BTW, there are many threads on Stack Overflow about the need for this thing. For example this one. I wish I could have mentioned TCC/Take Command in my answer there ;-)
I was hoping to find something I could use to do it with TCC, but as far as I can see there is no such support. So I spent some time googling around until I found a nice little alternative Windows shell called "Yori". Yori is open source and can be downloaded from here. It makes it easy to implement parallel process execution and wait for them to finish. In essence, what you need to do is to start the different sub-processes as so-called "jobs" and then use the internal command "wait" to wait for them to finish. You can start any process as a job by adding the special characters "&!" at the end of the command. Something like this:
ping localhost &!
ping someotherhost &!
wait
I suggest you add something similar (and probably much better and more flexible) to the set of internal commands of TCC. Some kind of "job management and registry" and a set of internal commands to work with it. Any chance to see it in the "near" future?
BTW, there are many threads on Stack Overflow about the need for this thing. For example this one. I wish I could have mentioned TCC/Take Command in my answer there ;-)
Last edited: