喉咙:节流应许返回函数的集合

时间:2021-02-06 05:16:39
【文件属性】:
文件名称:喉咙:节流应许返回函数的集合
文件大小:15KB
文件格式:ZIP
更新时间:2021-02-06 05:16:39
flow typescript promise concurrency TypeScriptJavaScript 喉 限制异步,承诺返回,一个或多个函数的并行性。 将并发设置为1时,它具有特殊的实用程序。 这样,您将获得互斥锁。 安装 npm install throat API 喉咙(并发) 这将返回一个有点像锁的函数(如果并发为1,则该函数实际上就是一个锁)。 例如,以下任一功能仅在一次执行: const throat = require ( 'throat' ) ( 2 ) ; const resA = throat ( async ( ) => { /* async stuff... */ } ) ; const resB = throat ( async ( ) => { /* async
【文件预览】:
throat-master
----.gitignore(121B)
----tsconfig.json(381B)
----README.md(2KB)
----index.js.flow(354B)
----.github()
--------workflows()
--------FUNDING.yml(527B)
--------ISSUE_TEMPLATE()
----test()
--------browser.js(1KB)
--------__snapshots__()
--------flow.test.js(388B)
--------index.js(14KB)
--------typescript-example.ts(913B)
--------typescript.test.js(285B)
--------flow-example.js(885B)
----.prettierrc(78B)
----LICENSE(1KB)
----SECURITY.md(287B)
----package.json(1KB)
----index.js(3KB)
----.flowconfig(39B)
----index.d.ts(1003B)
----perf.js(949B)

网友评论