chatGPT的js信号量实现
摘要:### 信号量类 在 JavaScript 中,可以使用 Promise 和 async/await 来模拟信号量,下面是一个简单的信号量实现: ```js class Semaphore { constructor(maxConcurrency) { this.maxConcurrency = m
阅读全文
posted @ 2023-08-28 18:20
posted @ 2023-08-28 18:20
posted @ 2023-08-15 15:58