multithreading - how to run portions of bash script in parallel -


i running bash script consisting of 2 rather intensive loops run in sequence (the first loop runs followed second). quite time consuming , wondering if there way run these loops in parallel in order make script more efficient?

any appreciated. thank you.

you can do:

(   while x             loop 1     done ) & (   while y             loop 2     done ) & # wait both loops finish wait 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -