Skip to content

Instantly share code, notes, and snippets.

View Zaynex's full-sized avatar
🎯
Focusing

Vincent Zaynex

🎯
Focusing
  • Hangzhou
View GitHub Profile
@Zaynex
Zaynex / paralleTask.ts
Last active June 6, 2019 16:08
并行的异步 task 队列
/**
* 并行异步队列
* 首次上传时占用最大的并行请求数
* 后续当每个之前的请求结束后,继续执行下一个请求
* 应用场景:分片文件上传
*
*/
class WraperTask {
task;
finished;