wzbus level
获赞
4
粉丝
0
关注
0
看过 TA
0
中国计量大学
2020
前端工程师
IP属地:浙江
暂未填写个人简介
私信
关注
2020-05-14 16:00
已编辑
中国计量大学 前端工程师
let doWork = (workid)=>{      return new Promise(resolve=>{         // 模拟大量任务         setTimeout(()=>{         &nbsp...
testifier:这道题我也遇到过,当时面试官说的是浏览器请求数的并发限制,当时没有答出来。今天有时间查了资料实现如下: https://gist.github.com/upupming/cbc24ada6f99d41073397b3842cdd884 运行结果: ```txt start running 0 start running 1 start running 2 finished running 2 start running 3 finished running 0 start running 4 finished running 4 start running 5 finished running 1 start running 6 finished running 5 start running 7 finished running 3 start running 8 finished running 7 start running 9 finished running 6 start running 10 finished running 8 start running 11 finished running 9 start running 12 finished running 11 start running 13 finished running 10 start running 14 finished running 12 start running 15 finished running 13 start running 16 finished running 16 start running 17 ... `` 参考资料:https://gist.github.com/jcouyang/632709f30e12a7879a73e9e132c0d56b查看图片
0 点赞 评论 收藏
分享
关注他的用户也关注了:
牛客网
牛客企业服务