
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
A queue for producer-consumer model
create one Queue with one consumer and two producer
const Queue = require('./index')
// 1. define queue instance
const queue = new Queue(2) //concurrency=2
// 2. consumer do something
var doSth=function(data,i){
console.log(`consume${i}: `,data)
}
// 3. begin consume
queue.run(doSth)
setInterval(function(){
// 4. begin produce
queue.push(Math.random())
},1000)
output
consume0: 0.8152931321636179
consume1: 0.10340654794346626
consume0: 0.7497420856391879
consume1: 0.7854904441673309
consume0: 0.9786641059681527
npm install
npm run test
👤 selenium39
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2021 selenium39.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator
FAQs
A queue for producer-consumer model
We found that pc-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.