文件名称:async-blocking-queue:AsyncBlockingQueue
文件大小:2KB
文件格式:ZIP
更新时间:2024-05-29 06:57:44
JavaScript
异步阻塞队列 npm install --save async-blocking-queue AsyncBlockingQueue import AsyncBlockingQueue from 'async-blocking-queue' ; var queue = new AsyncBlockingQueue ( ) ; // wait for next enqueue() result queue . dequeue ( ) . then ( ( result ) => console . info ( result ) ) ; setTimeout ( ( ) => { queue . enqueue ( 'hello world' ) } , 1000 ) ;
【文件预览】:
async-blocking-queue-master
----test()
--------queueSpec.js(463B)
----README.md(380B)
----.gitignore(37B)
----index.js(461B)
----package.json(607B)