Concurrency Functions time for i in `grep server /etc/hosts | awk '{print $1}'`; do (ssh $i "echo 123; sleep 1; echo 456" &); done real 0m0.063s user 0m0.016s sys 0m0.004s Concurrency capabilities of xargs time grep server /etc/hosts | awk '{print $1}' | xargs -P 24 -I {} ssh {} "echo 123; sleep 1; echo 456" real 0m3.747s user 0m1.136s sys 0m0.112s Concurrency is actually very simple. It does not require dozens of lines of golang or python code, nor does it require installation environment, compilation and other tedious steps. Just return to basics. Summarize You may also be interested in:
|
<<: Native js implements custom scroll bar component
>>: Ubuntu 15.04 opens mysql remote port 3306
Table of contents Lazy Loading CSS styles: HTML p...
This article records the installation tutorial of...
aforementioned This article is very short~ The ma...
Installation sequence rpm -ivh mysql-community-co...
Preface: Use debugbar to view document code in iet...
Now most of the Docker images are based on Debian...
Table of contents Preface 1. Create objects befor...
Table of contents CSS3 Box Model a. CSS3 filter b...
DTD is a set of grammatical rules for markup. It i...
Long story short, today we will talk about using ...
Table of contents 1. Introduction to Compose 2. C...
All blogs listed below are original and uniquely ...
Disclaimer: Since the project requires the use of...
At the beginning of this article, I would like to ...
20200804Addendum: The article may be incorrect. Y...