Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.1
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
quiz1 /
node_modules /
throat /
[ HOME SHELL ]
Name
Size
Permission
Action
LICENSE
1.03
KB
-rw-rw-rw-
README.md
2.31
KB
-rw-rw-rw-
index.d.ts
1003
B
-rw-rw-rw-
index.js
3.25
KB
-rw-rw-rw-
index.js.flow
354
B
-rw-rw-rw-
package.json
1.01
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : README.md
# throat Throttle the parallelism of an asynchronous, promise returning, function / functions. This has special utility when you set the concurrency to `1`. That way you get a mutually exclusive lock. [Professionally supported throat is now available](https://tidelift.com/subscription/pkg/npm-throat?utm_source=npm-throat&utm_medium=referral&utm_campaign=readme) [](https://github.com/ForbesLindesay/throat/actions/workflows/test.yml?query=branch%3Amaster) [](https://coveralls.io/github/ForbesLindesay/throat) [](https://rollingversions.com/ForbesLindesay/throat) [](https://www.npmjs.com/package/throat) ## Installation npm install throat ## API ### throat(concurrency) This returns a function that acts a bit like a lock (exactly as a lock if concurrency is 1). Example, only 2 of the following functions will execute at any one time: ```js const throat = require('throat')(2); const resA = throat(async () => { /* async stuff... */ }); const resB = throat(async () => { /* async stuff... */ }); const resC = throat(async () => { /* async stuff... */ }); const resD = throat(async () => { /* async stuff... */ }); const resE = throat(async () => { /* async stuff... */ }); ``` ### throat(concurrency, worker) This returns a function that is an exact copy of `worker` except that it will only execute up to `concurrency` times in parallel before further requests are queued: ```js const throat = require('throat'); const input = ['fileA.txt', 'fileB.txt', 'fileC.txt', 'fileD.txt']; const data = Promise.all( input.map(throat(2, (fileName) => readFile(fileName))) ); ``` Only 2 files will be read at a time, sometimes limiting parallelism in this way can improve scalability. ## Security contact information To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. ## License MIT
Close